// Copyright 2025 WIT.COM Inc Licensed GPL 3.0 package gitpb import ( "go.wit.com/lib/cobol" "go.wit.com/log" ) func (pb *Stats) PrintTable() string { t := pb.MakeTable("missing repos table") // limit the number of lines t.PrintTable() return log.Sprintf("pb.StatsTB: top 16 refs total=(%d)", pb.Len()) } func (pb *Stats) PrintTableLimit(limit int) string { t := pb.MakeTable("missing repos table") // limit the number of lines t.PrintTableLimit(limit) return log.Sprintf("pb.StatsTB: top %d refs total=(%d)", limit, 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.AddHash() col.Width = 10 col.Header.Name = "Git Hash" col = t.AddStringFunc("something", func(r *Stat) string { return "notsure" }) col.Width = 9 col = t.AddStringFunc("age", func(r *Stat) string { return cobol.Time(r.Ctime) }) col.Width = 28 col = t.AddSubject() col.Width = -1 return t }