summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-16 14:03:52 -0500
committerJeff Carr <[email protected]>2025-10-16 14:03:52 -0500
commit2351f3d6a825ea82864172e5f5185bcb6b74422c (patch)
tree5a0c7ed04fdc9f39cc714c8f0d4b0e571fc20c84
parenta8930a7f96937124c7ce13e8eac6526153d49275 (diff)
add stats table
-rw-r--r--tableStats.go35
1 files changed, 35 insertions, 0 deletions
diff --git a/tableStats.go b/tableStats.go
new file mode 100644
index 0000000..c30056f
--- /dev/null
+++ b/tableStats.go
@@ -0,0 +1,35 @@
+// Copyright 2025 WIT.COM Inc Licensed GPL 3.0
+
+package gitpb
+
+import (
+ "go.wit.com/log"
+)
+
+func (pb *Stats) PrintTable() string {
+ t := pb.MakeTable("missing repos table")
+
+ t.PrintTable()
+ return log.Sprintf("pb.StatsTB: total=(%d)", pb.Len())
+}
+
+func (pb *Stats) MakeTable(name string) *StatsTable {
+ t := pb.NewTable(name)
+ t.NewUuid()
+
+ var col *StatFunc
+
+ col = t.AddPatchId()
+ col.Width = 10
+
+ col = t.AddStringFunc("something", func(r *Stat) string {
+ return "notsure"
+ })
+ col.Width = 9
+
+
+ col = t.AddSubject()
+ col.Width = -1
+
+ return t
+}