mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-20 00:07:58 +08:00
delete unused function
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
package util
|
package util
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
@@ -48,13 +46,3 @@ func Config() Configuration {
|
|||||||
return viper.GetViper()
|
return viper.GetViper()
|
||||||
}
|
}
|
||||||
|
|
||||||
func SubConfig(subKey string) (Configuration, error) {
|
|
||||||
if subKey != "" {
|
|
||||||
sub := viper.GetViper().Sub(subKey)
|
|
||||||
if sub == nil {
|
|
||||||
return nil, fmt.Errorf("sub config [%s] not exist", subKey)
|
|
||||||
}
|
|
||||||
return sub, nil
|
|
||||||
}
|
|
||||||
return viper.GetViper(), nil
|
|
||||||
}
|
|
Reference in New Issue
Block a user