blob: 8e0a282643232c8e34ec4e7e2c2d7e8438feaef9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
}
|