From 3682f21aaaf117d5f705aa0313ceacf7ab663006 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 26 Sep 2025 00:08:21 -0500 Subject: make a new PB table to use the cobol.PrintTable() package --- humanForgedTable.go | 28 ++++++++++++++++++++++++++++ humanTable.go | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 humanForgedTable.go diff --git a/humanForgedTable.go b/humanForgedTable.go new file mode 100644 index 0000000..dcfb7a9 --- /dev/null +++ b/humanForgedTable.go @@ -0,0 +1,28 @@ +// Copyright 2025 WIT.COM Inc Licensed GPL 3.0 + +package forgepb + +import ( + "go.wit.com/lib/protobuf/gitpb" +) + +func (f *Forge) PrintForgedTable(pb *gitpb.Repos) { + tablePB := f.makeForgedTable(pb) + tablePB.MakeTable() + tablePB.PrintTable() +} + +func (f *Forge) makeForgedTable(pb *gitpb.Repos) *gitpb.ReposTable { + t := pb.NewTable("forgedList") + t.NewUuid() + + col := t.AddNamespace() + col.Width = 28 + + col = t.AddMasterVersion() + col.Width = 8 + + col = t.AddFullPath() + col.Width = -1 + return t +} diff --git a/humanTable.go b/humanTable.go index b476d74..4098eba 100644 --- a/humanTable.go +++ b/humanTable.go @@ -33,6 +33,7 @@ func (f *Forge) PrintHumanTable(allr *gitpb.Repos) { log.Infof("Total repositories: %d (%d master) (%d devel) (%d user) (%d unknown)\n", t.total, t.master, t.devel, t.user, t.unknown) } +/* func (f *Forge) PrintForgedTable(allr *gitpb.Repos) { log.DaemonMode(true) @@ -51,6 +52,7 @@ func (f *Forge) PrintForgedTable(allr *gitpb.Repos) { } log.Infof("Total repositories: %d (%d user) (%d devel) (%d master) (%d unknown)\n", t.total, t.user, t.devel, t.master, t.unknown) } +*/ func (f *Forge) PrintHumanTableFull(allr *gitpb.Repos) { log.DaemonMode(true) -- cgit v1.2.3