diff options
Diffstat (limited to 'weed/util/config.go')
| -rw-r--r-- | weed/util/config.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/weed/util/config.go b/weed/util/config.go index 1ea833d1f..f51955263 100644 --- a/weed/util/config.go +++ b/weed/util/config.go @@ -40,5 +40,15 @@ func LoadConfiguration(configFileName string, required bool) (loaded bool) { } return true +} +func Config() Configuration { + return viper.GetViper() } + +func SubConfig(subKey string) Configuration { + if subKey != "" { + return viper.GetViper().Sub(subKey) + } + return viper.GetViper() +}
\ No newline at end of file |
