From 5314952e14cedbb1d5827f66827c16a58ae05096 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 24 Oct 2025 18:30:54 -0500 Subject: s/ENV/env/ but ENV really is better here --- argv.template.go | 4 ++-- clone.go | 4 ++-- main.go | 4 ++-- work.go | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/argv.template.go b/argv.template.go index 1808722..6948afe 100644 --- a/argv.template.go +++ b/argv.template.go @@ -10,7 +10,7 @@ import ( "go.wit.com/dev/alexflint/arg" "go.wit.com/gui" - "go.wit.com/lib/ENV" + "go.wit.com/lib/env" "go.wit.com/lib/fhelp" "go.wit.com/log" ) @@ -64,7 +64,7 @@ func (args) InitGui() error { func (args) Exit() { gui.UnloadToolkits() - if ENV.Verbose() { + if env.Verbose() { log.Info("argv.Exit() called", APPNAME+".Exit()") } // remove this from the template for your app (or make one for youself if you need it) diff --git a/clone.go b/clone.go index 5b3453e..515fc6b 100644 --- a/clone.go +++ b/clone.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - "go.wit.com/lib/ENV" + "go.wit.com/lib/env" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" ) @@ -69,7 +69,7 @@ func clone(gopath string) (*gitpb.Repo, error) { gopath = CleanRepoURL(gopath) os.Setenv("REPO_AUTO_CLONE", "true") // pb, _ := me.forge.NewGoPath(gopath) - check := me.forge.FindAnyPath(filepath.Join(ENV.Get("gopath"), gopath)) + check := me.forge.FindAnyPath(filepath.Join(env.Get("gopath"), gopath)) if check != nil { if check.IsValidDir() { // repo already exists and is valid diff --git a/main.go b/main.go index 44b582c..ee8faa8 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "go.wit.com/lib/ENV" + "go.wit.com/lib/env" "go.wit.com/lib/protobuf/argvpb" "go.wit.com/lib/protobuf/forgepb" "go.wit.com/lib/protobuf/gitpb" @@ -79,6 +79,6 @@ func okExit(thing string) { func badExit(err error) { log.Info("Total repositories:", me.forge.Repos.Len()) - s := log.Sprintf("go-clone error in %s", ENV.Get("gopath")) + s := log.Sprintf("go-clone error in %s", env.Get("gopath")) me.argv.BadExit(s, err) } diff --git a/work.go b/work.go index 2983aae..2dff988 100644 --- a/work.go +++ b/work.go @@ -1,7 +1,7 @@ package main import ( - "go.wit.com/lib/ENV" + "go.wit.com/lib/env" "go.wit.com/lib/gui/shell" "go.wit.com/log" ) @@ -11,10 +11,10 @@ func autoWork() { if !argv.AutoWork { return } - log.Info("About to re-create", ENV.Get("gopath")+"/go.work") - shell.PathRun(ENV.Get("gopath"), []string{"mv", "go.work", "go.work.last"}) + log.Info("About to re-create", env.Get("gopath")+"/go.work") + shell.PathRun(env.Get("gopath"), []string{"mv", "go.work", "go.work.last"}) me.forge.MakeGoWork() - shell.PathRun(ENV.Get("gopath"), []string{"go", "work", "use"}) + shell.PathRun(env.Get("gopath"), []string{"go", "work", "use"}) log.Info("") log.Info("original go.work file saved as go.work.last") log.Info("") -- cgit v1.2.3