summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-24 18:31:13 -0500
committerJeff Carr <[email protected]>2025-10-24 18:31:13 -0500
commite1e8951cc3cad6db900ac1240512902936c4f97a (patch)
treef52ad248823da2b9cffd0a7eecef85690dd7d830
parent40151b542eaaa78fa46a7ca65059fe43d01c00f1 (diff)
s/ENV/env/ but ENV really is better herev0.0.67
-rw-r--r--argv.template.go4
-rw-r--r--config.go6
-rw-r--r--doPatches.go6
-rw-r--r--doRepos.go6
-rw-r--r--main.go8
5 files changed, 15 insertions, 15 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/config.go b/config.go
index 7a7f119..cbb96ac 100644
--- a/config.go
+++ b/config.go
@@ -8,8 +8,8 @@ import (
"os"
"path/filepath"
- "go.wit.com/lib/ENV"
"go.wit.com/lib/config"
+ "go.wit.com/lib/env"
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/log"
)
@@ -28,8 +28,8 @@ func configInit() *forgepb.ForgeConfigs {
configs.Filename = config.MakeConfigFilename("forged", "forge")
err := config.ReLoad(configs)
if errors.Is(err, os.ErrNotExist) {
- ENV.Set("ReposDir", "/var/cache/forged")
- ENV.Set("ReposPB", filepath.Join(ENV.Get("ReposDir"), "repos.pb"))
+ env.Set("ReposDir", "/var/cache/forged")
+ env.Set("ReposPB", filepath.Join(env.Get("ReposDir"), "repos.pb"))
if err := configSave(); err != nil {
badExit(err)
}
diff --git a/doPatches.go b/doPatches.go
index b2ea050..490ed95 100644
--- a/doPatches.go
+++ b/doPatches.go
@@ -1,7 +1,7 @@
package main
import (
- "go.wit.com/lib/ENV"
+ "go.wit.com/lib/env"
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/log"
)
@@ -9,13 +9,13 @@ import (
func doPatches() error {
if argv.Patch.List != nil {
log.Printf("forge.Init() %s len()=%d\n", me.forge.Config.Filename, me.forge.Repos.Len())
- ENV.PrintTable()
+ env.PrintTable()
return doList()
}
if argv.Patch.Clean != nil {
log.Printf("forge.Init() %s len()=%d\n", me.forge.Config.Filename, me.forge.Repos.Len())
- ENV.PrintTable()
+ env.PrintTable()
return doClean()
}
diff --git a/doRepos.go b/doRepos.go
index 42162b8..f10300d 100644
--- a/doRepos.go
+++ b/doRepos.go
@@ -4,8 +4,8 @@ import (
"os"
"time"
- "go.wit.com/lib/ENV"
"go.wit.com/lib/config"
+ "go.wit.com/lib/env"
"go.wit.com/lib/gui/shell"
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/gitpb"
@@ -50,8 +50,8 @@ func doRepos() error {
}
if argv.Repos.Scan != nil {
- log.Infof("start repos scan repos.Len()=%d %s\n", me.forge.Repos.Len(), ENV.Get("ReposDir"))
- _, err := scanForgedDir(ENV.Get("ReposDir"))
+ log.Infof("start repos scan repos.Len()=%d %s\n", me.forge.Repos.Len(), env.Get("ReposDir"))
+ _, err := scanForgedDir(env.Get("ReposDir"))
me.forge.Save()
return err
}
diff --git a/main.go b/main.go
index fffa906..1cd490a 100644
--- a/main.go
+++ b/main.go
@@ -9,7 +9,7 @@ import (
"path/filepath"
"time"
- "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"
@@ -22,7 +22,7 @@ var resources embed.FS
var HOSTNAME string = "forge.wit.com"
func saveMissing() error {
- err := me.missing.SaveValidate(filepath.Join(ENV.Get("ReposDir"), "missing.pb"))
+ err := me.missing.SaveValidate(filepath.Join(env.Get("ReposDir"), "missing.pb"))
if err != nil {
log.Info("failed to save missing.pb", err)
}
@@ -38,7 +38,7 @@ func main() {
if err != nil {
panic("forge.InitByFullPath() failed")
}
- ENV.PrintTable()
+ env.PrintTable()
if err := me.forge.InitPatchsets(); err != nil {
log.Info("patches failed to open", err)
@@ -53,7 +53,7 @@ func main() {
}
me.missing = gitpb.NewRepos()
- err = me.missing.ConfigLoad(filepath.Join(ENV.Get("ReposDir"), "missing.pb"))
+ err = me.missing.ConfigLoad(filepath.Join(env.Get("ReposDir"), "missing.pb"))
if errors.Is(err, os.ErrNotExist) {
saveMissing()
} else if err != nil {