This commit is contained in:
2026-03-20 21:41:00 +08:00
Unverified
commit 3d1d4cf506
53 changed files with 7105 additions and 0 deletions

19
pkg/config/config.go Normal file
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
}