diff options
| author | Jeff Carr <[email protected]> | 2025-10-14 00:15:41 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-14 00:15:41 -0500 |
| commit | fc17dc394aedbc5fd636676202bad40c1f98c1de (patch) | |
| tree | 197ff50da15f186c38d50a71fede7b0c160ee57f /config.Save.go | |
| parent | 3b4821a3af62376d675699493e01cd07891ad69c (diff) | |
implement application specific Config files (and Verbose())
Diffstat (limited to 'config.Save.go')
| -rw-r--r-- | config.Save.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/config.Save.go b/config.Save.go new file mode 100644 index 0000000..d7d0bbf --- /dev/null +++ b/config.Save.go @@ -0,0 +1,16 @@ +package config + +import ( + "os" + "path/filepath" +) + +// saves your applications config file +func Save() error { + basedir, _ := filepath.Split(configPB.Filename) + if err := os.MkdirAll(basedir, os.ModePerm); err != nil { + return err + } + err := SavePB(configPB) + return err +} |
