From 1d44eb1493d81842b58f53bff5ad8741b7b5934c Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 25 Oct 2025 01:25:26 -0500 Subject: show mode in the table header --- Load.go | 8 ++++++-- init.go | 4 +++- tableDefault.go | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Load.go b/Load.go index ec1d035..d940323 100644 --- a/Load.go +++ b/Load.go @@ -23,7 +23,9 @@ import ( func (pb *ForgeConfigs) loadConfig() error { pb.Filename = config.MakeConfigFilename("forge", "forge") err := config.ReLoad(pb) - log.Printf("%s loadConfig() about to load Config from %s\n", argvpb.GetAPPNAME(), pb.Filename) + if env.Verbose() { + log.Printf("%s loadConfig() about to load Config from %s\n", argvpb.GetAPPNAME(), pb.Filename) + } if err != nil { log.Info("couldn't load filename:", pb.Filename) log.Info("forge has not been configured") @@ -43,7 +45,9 @@ func (pb *ForgeConfigs) loadConfig() error { // todo: deprecate this fc.GoPath = "" // I want to do this but it might be a bad idea at this point } - log.Printf("%s loadConfig() loaded Config from %s\n", argvpb.GetAPPNAME(), pb.Filename) + if env.Verbose() { + log.Printf("%s loadConfig() loaded Config from %s\n", argvpb.GetAPPNAME(), pb.Filename) + } if changed { config.SetChanged("forge", true) } diff --git a/init.go b/init.go index b3a4d2f..1c04769 100644 --- a/init.go +++ b/init.go @@ -106,7 +106,9 @@ func (f *Forge) postInit() error { // panic() here? // warning? // (probably not. it's just the repos.pb cache file err := f.reposCacheLoad() // loads the file from ~/.cache/forge/repos.pb if err == nil { - log.Printf("forge loaded %s file with len(%d) repos\n", f.Repos.Filename, f.Repos.Len()) + if env.Verbose() { + log.Printf("forge loaded %s file with len(%d) repos\n", f.Repos.Filename, f.Repos.Len()) + } } else { log.Printf("forge failed to load %s file with len(%d) repos err=(%v)\n", f.Repos.Filename, f.Repos.Len(), err) panic("failed to load repos.pb") diff --git a/tableDefault.go b/tableDefault.go index 9cd9012..a58f9e9 100644 --- a/tableDefault.go +++ b/tableDefault.go @@ -61,6 +61,7 @@ func (f *Forge) makeDefaultTB(pb *gitpb.Repos) *gitpb.ReposTable { col = t.AddNamespace() col.Width = 33 + col.Header.Name = "Namespace " + f.mode.String() col = t.AddCurrentBranchName() col.Width = 7 -- cgit v1.2.3