You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
496 B
Go

// Package config -----------------------------
// @file : config.go
// @author : JJXu
// @contact : wavingbear@163.com
// @time : 2023/8/22 14:02
// -------------------------------------------
package config
import (
"gopkg.in/ini.v1"
)
var (
Mode string
)
func LoadConfig(confPath string) error {
file, err := ini.Load(confPath)
if err != nil {
return err
}
Mode = file.Section("system").Key("mode").String()
Bos.LoadConfig(file)
Zap.LoadConfig(file)
return nil
}