diff options
| author | Jeff Carr <[email protected]> | 2025-10-04 03:45:49 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-04 03:45:49 -0500 |
| commit | 8d535b0a0771ceb53a4163226b1d7d5f95052989 (patch) | |
| tree | fdbef32a60674ea185024c8aba37fac836cce528 /tablePull.go | |
| parent | 5ee8c4f295205e7bfd316b43a503f1ec281a1b03 (diff) | |
start removing old table codev0.0.163
Diffstat (limited to 'tablePull.go')
| -rw-r--r-- | tablePull.go | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tablePull.go b/tablePull.go new file mode 100644 index 0000000..8e0a282 --- /dev/null +++ b/tablePull.go @@ -0,0 +1,45 @@ +// Copyright 2025 WIT.COM Inc Licensed GPL 3.0 + +package forgepb + +import ( + "path/filepath" + + "go.wit.com/lib/protobuf/gitpb" +) + +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.RepoFunc + // 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 +} |
