mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 18:20:50 +00:00
clear:formatting code
This commit is contained in:
@@ -16,7 +16,6 @@ var cfgLog *viper.Viper
|
||||
var cfgSsl *viper.Viper
|
||||
var cfgGen *viper.Viper
|
||||
|
||||
|
||||
//载入配置文件
|
||||
func ConfigSetup(path string) {
|
||||
viper.SetConfigFile(path)
|
||||
@@ -25,7 +24,6 @@ func ConfigSetup(path string) {
|
||||
log.Fatal(fmt.Sprintf("Read config file fail: %s", err.Error()))
|
||||
}
|
||||
|
||||
|
||||
//Replace environment variables
|
||||
err = viper.ReadConfig(strings.NewReader(os.ExpandEnv(string(content))))
|
||||
if err != nil {
|
||||
@@ -69,7 +67,6 @@ func ConfigSetup(path string) {
|
||||
GenConfig = InitGen(cfgGen)
|
||||
}
|
||||
|
||||
|
||||
func SetConfig(configPath string, key string, value interface{}) {
|
||||
viper.AddConfigPath(configPath)
|
||||
viper.Set(key, value)
|
||||
|
||||
Reference in New Issue
Block a user