summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-25 01:25:26 -0500
committerJeff Carr <[email protected]>2025-10-25 01:25:26 -0500
commit1d44eb1493d81842b58f53bff5ad8741b7b5934c (patch)
treed3d007e6ef3271f16a868c71f25ba6f5177c7ece
parente3f7c41f1082f132182c84961ab9fdf9666c8d79 (diff)
show mode in the table header
-rw-r--r--Load.go8
-rw-r--r--init.go4
-rw-r--r--tableDefault.go1
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