make generic print table PB to STDOUT

This commit is contained in:
Jeff Carr 2025-09-14 05:50:23 -05:00
parent 03b8e58451
commit 0aafe6bb86
2 changed files with 14 additions and 16 deletions

View File

@ -7,7 +7,7 @@ BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
# make andlabs # try the andlabs gui plugin (uses GTK) # make andlabs # try the andlabs gui plugin (uses GTK)
default: install-verbose default: install-verbose
forge forge tag list
vet: vet:
@GO111MODULE=off go vet @GO111MODULE=off go vet

View File

@ -24,14 +24,24 @@ func FindRepoByFullPath(wd string) *gitpb.Repo {
} }
func doTag() error { func doTag() error {
wd, _ := os.Getwd()
if argv.Tag.List != nil { if argv.Tag.List != nil {
log.Info("list tags here") repo := FindRepoByFullPath(wd)
if repo == nil {
log.Info("Could not find repo:", wd)
return nil
}
tagTablePB := makeTagTablePB(repo.Tags)
// tbox := win.Bottom.Box().SetProgName("TBOX")
// t.SetParent(tbox)
tagTablePB.MakeTable()
tagTablePB.PrintTable()
log.Info("list tags here", repo.Namespace)
return nil return nil
} }
if argv.Tag.Delete != "" { if argv.Tag.Delete != "" {
wd, _ := os.Getwd()
repo := FindRepoByFullPath(wd) repo := FindRepoByFullPath(wd)
if repo == nil { if repo == nil {
log.Info("Could not find repo:", wd) log.Info("Could not find repo:", wd)
@ -57,18 +67,6 @@ func doTag() error {
return nil return nil
} }
ns := "go.wit.com/apps/forge"
repo := me.forge.Repos.FindByNamespace(ns)
if repo == nil {
return log.Errorf("could not find %s", ns)
}
tagTablePB := makeTagTablePB(repo.Tags)
// tbox := win.Bottom.Box().SetProgName("TBOX")
// t.SetParent(tbox)
tagTablePB.MakeTable()
tagTablePB.PrintTable()
log.Info("do other tag stuff here") log.Info("do other tag stuff here")
return nil return nil
} }