fix terminal table that prints to STDOUT

This commit is contained in:
Jeff Carr 2025-09-04 08:12:33 -05:00
parent e506a73349
commit 15fbb15da8
1 changed files with 8 additions and 8 deletions

View File

@ -42,8 +42,8 @@ func (f *Forge) PrintHumanTable(allr *gitpb.Repos) {
t := new(tally)
// print the header
args := []string{"namespace", "cur br", "age", "master", "devel", "user", "curver", "lasttag", "next", "repo type"}
sizes := []int{40, 12, 6, 12, 16, 16, 16, 12, 12, 8}
args := []string{"namespace", "cur br", "age", "master", "devel", "user", "", "lasttag", "next", "repo type"}
sizes := []int{40, 9, 6, 16, 16, 16, 1, 12, 12, 8}
log.Info(cobol.TerminalChomp(standardTableSize10(sizes, args)))
all := allr.SortByFullPath()
@ -62,7 +62,7 @@ func (f *Forge) PrintForgedTable(allr *gitpb.Repos) {
// print the header
args := []string{"namespace", "cur br", "age", "master", "devel", "last tag", "", "", "", ""}
sizes := []int{40, 12, 6, 12, 16, 16, 16, 12, 12, 8}
sizes := []int{40, 9, 6, 12, 16, 16, 16, 12, 12, 8}
log.Info(cobol.TerminalChomp(standardTableSize10(sizes, args)))
all := allr.SortByFullPath()
@ -80,8 +80,8 @@ func (f *Forge) PrintHumanTableFull(allr *gitpb.Repos) {
t := new(tally)
// print the header
args := []string{"cur br", "age", "master", "devel", "user", "curver", "lasttag", "next", "repo type", "namespace"}
sizes := []int{12, 6, 12, 16, 16, 16, 12, 12, 8, 0}
args := []string{"cur br", "age", "master", "devel", "user", "", "lasttag", "next", "repo type", "namespace"}
sizes := []int{9, 6, 16, 16, 16, 1, 12, 12, 8, 0}
log.Info(cobol.TerminalChomp(standardTableSize10(sizes, args)))
all := allr.SortByFullPath()
@ -100,8 +100,8 @@ func (f *Forge) PrintHumanTableDirty(allr *gitpb.Repos) {
t := new(tally)
// print the header
args := []string{"namespace", "cur br", "age", "master", "devel", "user", "curver", "lasttag", "next", "repo type"}
sizes := []int{40, 12, 6, 12, 16, 16, 16, 12, 12, 8}
args := []string{"namespace", "cur br", "age", "master", "devel", "user", "", "lasttag", "next", "repo type"}
sizes := []int{40, 9, 6, 16, 16, 16, 1, 12, 12, 8}
log.Info(cobol.TerminalChomp(standardTableSize10(sizes, args)))
for repo := range allr.IterAll() {
@ -218,7 +218,7 @@ func (f *Forge) printRepoToTable(repo *gitpb.Repo, sizes []int, full bool) {
}
var lasttag string = repo.GetLastTag()
var thort string = repo.GetTargetVersion()
var chort string = repo.GetCurrentBranchVersion()
var chort string = "" // repo.GetCurrentBranchVersion()
var cname string = repo.GetCurrentBranchName()
var gopath string = repo.GetNamespace()