this is cool and all but the tables don't render properly

This commit is contained in:
2025-02-01 23:15:54 -05:00
parent b09cb83017
commit 3a7ed5973b
28 changed files with 1917 additions and 88 deletions

View File

@@ -0,0 +1,113 @@
package main
import (
`reflect`
)
/*
Hdr prints the header for a tableAddrSizer corresponding to a slice of tableAddr.
indent will be printed before the string.
If plain is true, only ASCII chars will be used; otherwise fancy-schmancy Unicode.
*/
func (t *tableAddrSizer) Hdr(indent string, plain bool) (out string) {
var val reflect.Value
if t == nil {
return
}
val = reflect.ValueOf(*t)
out = hdrRender(val, indent, plain)
return
}
// Line either prints the *last line* (the border) or a *row separator* (if allowed in the format).
func (t *tableAddrSizer) Line(indent string, plain bool, rowIdx, numRows int) (out string) {
var val reflect.Value
if t == nil {
return
}
val = reflect.ValueOf(*t)
out = hdrLineRender(val, indent, plain, rowIdx, numRows)
return
}
/*
Hdr prints the header for a tableLegacy4Sizer corresponding to a slice of tableLegacy4.
indent will be printed before the string.
If plain is true, only ASCII chars will be used; otherwise fancy-schmancy Unicode.
*/
func (t *tableLegacy4Sizer) Hdr(indent string, plain bool) (out string) {
var val reflect.Value
if t == nil {
return
}
val = reflect.ValueOf(*t)
out = hdrRender(val, indent, plain)
return
}
// Line either prints the *last line* (the border) or a *row separator* (if allowed in the format).
func (t *tableLegacy4Sizer) Line(indent string, plain bool, rowIdx, numRows int) (out string) {
var val reflect.Value
if t == nil {
return
}
val = reflect.ValueOf(*t)
out = hdrLineRender(val, indent, plain, rowIdx, numRows)
return
}
/*
Hdr prints the header for a tableMask4Sizer corresponding to a slice of tableMask4.
indent will be printed before the string.
If plain is true, only ASCII chars will be used; otherwise fancy-schmancy Unicode.
*/
func (t *tableMask4Sizer) Hdr(indent string, plain bool) (out string) {
var val reflect.Value
if t == nil {
return
}
val = reflect.ValueOf(*t)
out = hdrRender(val, indent, plain)
return
}
// Line either prints the *last line* (the border) or a *row separator* (if allowed in the format).
func (t *tableMask4Sizer) Line(indent string, plain bool, rowIdx, numRows int) (out string) {
var val reflect.Value
if t == nil {
return
}
val = reflect.ValueOf(*t)
out = hdrLineRender(val, indent, plain, rowIdx, numRows)
return
}