blob: 40e56ef0ba5d9f838617e1865969459574ca1190 (
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
46
47
48
49
50
51
52
53
54
|
// Copyright 2025 WIT.COM Inc Licensed GPL 3.0
package gitpb
import (
"go.wit.com/log"
)
func (pb *Repos) PrintGowebdTable() string {
t := pb.MakeGowebdTable("missing repos table")
t.PrintTable()
return log.Sprintf("pb.GowebReposTB: total=(%d)", pb.Len())
}
func (pb *Repos) MakeGowebdTable(name string) *ReposTable {
t := pb.NewTable(name)
t.NewUuid()
var col *RepoFunc
// var col int
col = t.AddNamespace()
col.Width = 30
col = t.AddMasterVersion()
// col.SetTitle("mver")
col.Width = 15
col = t.AddStringFunc("Tags", func(r *Repo) string {
if r.Tags == nil {
return "nil"
}
// log.Infof("repo: %v\n", r)
return log.Sprintf("len(%d)", r.Tags.Len())
})
col.Width = 9
col = t.AddStringFunc("cur tag", func(r *Repo) string {
if r.CurrentTag == nil {
return "nil"
}
return "ok"
})
col.Width = 9
col = t.AddDevelVersion()
col.Width = 15
col = t.AddFullPath()
col.Width = -1
return t
}
|