this is cool and all but the tables don't render properly
This commit is contained in:
54
cmd/subnetter/funcs_tblrows.go
Normal file
54
cmd/subnetter/funcs_tblrows.go
Normal file
@@ -0,0 +1,54 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
`reflect`
|
||||
)
|
||||
|
||||
// Row prints the formatted row for a tableAddr.
|
||||
func (t *tableAddr) Row(sizer *tableAddrSizer, indent string, plain bool) (out string) {
|
||||
|
||||
var val reflect.Value
|
||||
var sizerVal reflect.Value
|
||||
|
||||
if t == nil || sizer == nil {
|
||||
return
|
||||
}
|
||||
val = reflect.ValueOf(*t)
|
||||
sizerVal = reflect.ValueOf(*sizer)
|
||||
|
||||
out = rowRender(val, sizerVal, indent, plain)
|
||||
return
|
||||
}
|
||||
|
||||
// Row prints the formatted row for a tableLegacy4.
|
||||
func (t *tableLegacy4) Row(sizer *tableLegacy4Sizer, indent string, plain bool) (out string) {
|
||||
|
||||
var val reflect.Value
|
||||
var sizerVal reflect.Value
|
||||
|
||||
if t == nil || sizer == nil {
|
||||
return
|
||||
}
|
||||
val = reflect.ValueOf(*t)
|
||||
sizerVal = reflect.ValueOf(*sizer)
|
||||
|
||||
out = rowRender(val, sizerVal, indent, plain)
|
||||
return
|
||||
}
|
||||
|
||||
// Row prints the formatted row for a tableMask4.
|
||||
func (t *tableMask4) Row(sizer *tableMask4Sizer, indent string, plain bool) (out string) {
|
||||
|
||||
var val reflect.Value
|
||||
var sizerVal reflect.Value
|
||||
|
||||
if t == nil || sizer == nil {
|
||||
return
|
||||
}
|
||||
val = reflect.ValueOf(*t)
|
||||
sizerVal = reflect.ValueOf(*sizer)
|
||||
|
||||
out = rowRender(val, sizerVal, indent, plain)
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user