From 357abac7e7358cc942071ebe1b5a9b6cc4ed3917 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 26 Sep 2025 13:05:17 -0500 Subject: make a git pull debugging table --- human.go | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'human.go') diff --git a/human.go b/human.go index 4a46a04..48c9a66 100644 --- a/human.go +++ b/human.go @@ -4,6 +4,7 @@ package forgepb import ( "fmt" + "path/filepath" "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/gitpb" @@ -113,3 +114,39 @@ func (f *Forge) PrintReleaseReport(repos *gitpb.Repos) int { log.Info(fmt.Sprintf("total repo count = %d", count)) return count } + +func (f *Forge) PrintPullTable(all *gitpb.Repos) { + tablePB := f.makePullTable(all) + tablePB.PrintTable() +} + +func (f *Forge) makePullTable(pb *gitpb.Repos) *gitpb.ReposTable { + t := pb.NewTable("pullTable") + t.NewUuid() + + var col *gitpb.RepoAnyFunc + // var col int + + col = t.AddMasterBranchName() + col.Width = 10 + + col = t.AddMasterVersion() + // col.SetTitle("mver") + col.Width = 15 + + col = t.AddStringFunc("blah", func(r *gitpb.Repo) string { + _, base := filepath.Split(r.Namespace) + return base + }) + col.Width = 9 + + col = t.AddDevelVersion() + col.Width = 15 + + col = t.AddNamespace() + col.Width = 18 + + col = t.AddFullPath() + col.Width = -1 + return t +} -- cgit v1.2.3