diff options
| author | Jeff Carr <[email protected]> | 2025-10-17 14:34:58 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-17 14:34:58 -0500 |
| commit | 83a57708772703e839c6d5fb15a03d788cd33e8f (patch) | |
| tree | c40eafe8c0c9bd1270b38d087b7adced26aebf09 /tableForged.go | |
| parent | b32f730a978d5dfca559de16974c0be84f4ecbd0 (diff) | |
moved to gitpb
Diffstat (limited to 'tableForged.go')
| -rw-r--r-- | tableForged.go | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/tableForged.go b/tableForged.go deleted file mode 100644 index 3faaf01..0000000 --- a/tableForged.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2025 WIT.COM Inc Licensed GPL 3.0 - -package forgepb - -import ( - "go.wit.com/lib/protobuf/gitpb" - "go.wit.com/log" -) - -func (f *Forge) PrintForgedTable(pb *gitpb.Repos) string { - tablePB := f.makeForgedTable(pb) - tablePB.PrintTable() - return log.Sprintf("fpb.ForgedTable: %d repos", pb.Len()) -} - -func (f *Forge) makeForgedTable(pb *gitpb.Repos) *gitpb.ReposTable { - t := pb.NewTable("forgedList") - t.NewUuid() - - var col *gitpb.RepoFunc - - col = t.AddMasterBranchName() - col.Width = 3 - - col = t.AddMasterVersion() - col.Width = 10 - - col = t.AddStringFunc("hash", func(r *gitpb.Repo) string { - if r.Tags == nil { - return "nil" - } - if r.Tags.Master == nil { - return "nil" - } - return r.Tags.Master.Hash - }) - col.Width = 6 - - col = t.AddDevelBranchName() - col.Width = 3 - - col = t.AddDevelVersion() - col.Width = 10 - - col = t.AddStringFunc("hash", func(r *gitpb.Repo) string { - if r.Tags == nil { - return "nil" - } - if r.Tags.Devel == nil { - return "nil" - } - return r.Tags.Devel.Hash - }) - col.Width = 6 - - col = t.AddState() - col.Width = 16 - - col = t.AddNamespace() - col.Width = 42 - - col = t.AddURL() - col.Width = -1 - return t -} |
