config: add default path, customized configs.

A customised config is an ini file with a [default] section and some
other name sections; a config file is loaded from the default section
with any keys in the named section being added in, overriding keys in
the host. This allows for, e.g. setting different paths based on the
host name or operating system.
This commit is contained in:
2022-02-20 17:40:38 -08:00
parent c7c51568d8
commit b893e99864
6 changed files with 465 additions and 0 deletions

7
config/path_test.go Normal file
View File

@@ -0,0 +1,7 @@
package config
import "testing"
func TestDefaultPath(t *testing.T) {
t.Log(DefaultConfigPath("demoapp", "app.conf"))
}