reorder target to the end

This commit is contained in:
Jeff Carr 2025-01-19 00:36:32 -06:00
parent a822e1e4f0
commit bdf9d97cf9
2 changed files with 8 additions and 6 deletions

View File

@ -54,7 +54,7 @@ func (f *Forge) PrintHumanTableDirty(allr *gitpb.Repos) {
var count int
// log.Info(standardStart5("gopath", "cur name", "master", "user", "repo type"))
log.Info(standardTable8("repopath", "cur br", "age", "target", "master", "devel", "user", "curver", "repo type"))
log.Info(standardTable8("repopath", "cur br", "age", "master", "devel", "user", "curver", "target", "repo type"))
// all := allr.SortByFullPath()
all := allr.All()
for all.Scan() {
@ -111,7 +111,7 @@ func standardTable8(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 string)
len5 := 16
len6 := 16
len7 := 16
len8 := 16
len8 := 12
len9 := 8
var s string
if len(arg1) > len1 {
@ -139,12 +139,12 @@ func standardTable8(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 string)
if len(arg6) > len6 {
arg6 = arg6[:len6]
}
s += "%-" + fmt.Sprintf("%d", len6) + "s "
s += "%-" + fmt.Sprintf("%d", len6) + "s "
if len(arg7) > len7 {
arg7 = arg7[:len7]
}
s += "%-" + fmt.Sprintf("%d", len7) + "s "
s += "%-" + fmt.Sprintf("%d", len7) + "s "
if len(arg8) > len8 {
arg8 = arg8[:len8]
@ -164,6 +164,8 @@ func (f *Forge) printRepoToTable(repo *gitpb.Repo) {
if repo.IsDirty() {
end += "(dirty) "
}
// shortened version numbers
var mhort string = repo.GetMasterVersion()
var dhort string = repo.GetDevelVersion()
var uhort string = repo.GetUserVersion()
@ -178,7 +180,7 @@ func (f *Forge) printRepoToTable(repo *gitpb.Repo) {
// age := shell.FormatDuration(time.Since(ctime))
age := shell.FormatDuration(repo.NewestAge())
start := standardTable8(gopath, cname, age, thort, mhort, dhort, uhort, chort, rtype)
start := standardTable8(gopath, cname, age, mhort, dhort, uhort, chort, thort, rtype)
if f.Config.IsReadOnly(repo.GetGoPath()) {
end += "(readonly) "

View File

@ -106,7 +106,7 @@ func (f *Forge) InitPB() {
} else {
log.Log(INFO, "forgepb.Init() FORGE_GOSRC ", os.Getenv("FORGE_GOSRC"), "(go.work = false)")
}
f.Repos = new(gitpb.Repos)
f.Repos = gitpb.NewRepos()
f.Repos.ConfigLoad()
}