go_subnetter/cmd/subnetter/funcs_tblrows.go

55 lines
1.1 KiB
Go

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
}