From 5036409ef63bc4bf9b63d7dd0cf06cdcb2285ab9 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 21 Oct 2025 06:41:28 -0500 Subject: use lib/ENV --- init.go | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) (limited to 'init.go') diff --git a/init.go b/init.go index 5069803..e9c5779 100644 --- a/init.go +++ b/init.go @@ -3,12 +3,7 @@ package config // this is an experiment at this point to // see how this turns out -import ( - "fmt" - "os" - "path/filepath" -) - +/* var configPB *Configs // these are normally what are sent from ldflags @@ -25,30 +20,6 @@ func Init(appname, version, buildtime string, fromargv []string) error { argv = fromargv return loadENV() - /* - configDir, err := os.UserConfigDir() - if err != nil { - fmt.Println("OS isn't returning UserConfigDir()", err) - return err - } - fullname := filepath.Join(configDir, appname, "config.text") - configPB = NewConfigs() - err = loadTEXT(configPB, fullname) - if err == nil { - return nil - } - - if errors.Is(err, os.ErrNotExist) { - // file doesn't exist, make a new file - return makeNewConfigFile(appname) - } - if errors.Is(err, ErrEmpty) { - fmt.Printf("config file size was empty. out of diskspace? %s\n", fullname) - return err - } - fmt.Println("config.Init()", err) - return err - */ } func makeNewConfigFile(appname string) error { @@ -71,3 +42,4 @@ func makeNewConfigFile(appname string) error { err = Save() return err } +*/ -- cgit v1.2.3