restructure

This commit is contained in:
yanghao05
2023-04-28 15:10:28 +08:00
parent 3a9d5492f8
commit ebcd25f776
6 changed files with 118 additions and 14 deletions

View File

@@ -5,14 +5,6 @@ import (
"github.com/spf13/viper"
)
func AutoLoad() *viper.Viper {
v, err := Load("config.toml")
if err != nil {
return nil
}
return v
}
func Load(file string) (*viper.Viper, error) {
v := viper.NewWithOptions(viper.KeyDelimiter("_"))
v.AutomaticEnv()