BUGFIX: read XML data

This commit is contained in:
Simon Martens
2025-03-13 18:31:09 +01:00
parent e839bbebe8
commit f85dbab551
9 changed files with 105 additions and 28 deletions

View File

@@ -5,14 +5,16 @@ import "sync"
var cp *ConfigProvider
var mu = sync.Mutex{}
func Get() Config {
func Get() (Config, error) {
mu.Lock()
defer mu.Unlock()
if cp == nil {
cp = NewConfigProvider([]string{"config.dev.json", "config.json"})
return *cp.Config, cp.Read()
}
return *cp.Config
return *cp.Config, nil
}
func Set(config Config) {