aboutsummaryrefslogtreecommitdiff
path: root/weed/util/config.go
diff options
context:
space:
mode:
authorstlpmo <hq-STLPMO@chinaunicom.cn>2019-11-11 09:15:17 +0800
committerstlpmo <hq-STLPMO@chinaunicom.cn>2019-11-11 09:15:17 +0800
commit802a0eb3fe115cd213d1238912fe431601e8f102 (patch)
tree168428721bbbdbee95900ff117e7d86f5c060807 /weed/util/config.go
parent1c8bed381068f3a3bd6858c774c39744f760db73 (diff)
downloadseaweedfs-802a0eb3fe115cd213d1238912fe431601e8f102.tar.xz
seaweedfs-802a0eb3fe115cd213d1238912fe431601e8f102.zip
move from cmd-line to scaffold
Diffstat (limited to 'weed/util/config.go')
-rw-r--r--weed/util/config.go10
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