diff options
Diffstat (limited to 'table.go')
| -rw-r--r-- | table.go | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/table.go b/table.go new file mode 100644 index 0000000..c7afec8 --- /dev/null +++ b/table.go @@ -0,0 +1,46 @@ +// Copyright 2025 WIT.COM Inc Licensed GPL 3.0 + +package ENV + +import ( + "go.wit.com/log" +) + +func PrintTable() string { + t := envPB.MakeTable("ENV table") + + // limit the number of lines + t.PrintTable() + return log.Sprintf("ENV: total=(%d)", envPB.Len()) +} + +func (pb *Keys) MakeTable(name string) *KeysTable { + t := pb.NewTable(name) + t.NewUuid() + + var col *KeyFunc + + col = t.AddStringFunc("Source", func(k *Key) string { + return k.Global + }) + col.Width = 20 + + col = t.AddVar() + col.Width = 20 + + col = t.AddValue() + col.Width = -1 + // col.Header.Name = "Git Hash" + + /* + col = t.AddStringFunc("age", func(r *Key) string { + return cobol.Time(r.Ctime) + }) + col.Width = 28 + + col = t.AddSubject() + col.Width = -1 + */ + + return t +} |
