This commit is contained in:
biss committed 2026-03-20 21:41:00 +08:00
commit 3d1d4cf506
53 files changed
+7105

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
package config
import (
"github.com/spf13/viper"
)
var Config *viper.Viper
func Init(configPath string) error {
Config = viper.New()
Config.SetConfigFile(configPath)
Config.SetConfigType("yaml")
if err := Config.ReadInConfig(); err != nil {
return err
}
return nil
}