diff options
Diffstat (limited to 'human.go')
| -rw-r--r-- | human.go | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -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 +} |
