1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

fix typo.

This commit is contained in:
Mrs4s 2021-01-28 20:54:38 +08:00
parent dc18944a98
commit ae806c53bb
3 changed files with 5 additions and 5 deletions

View File

@ -277,8 +277,8 @@ func DefaultConfig() *JSONConfig {
}
}
//Load 加载配置文件
func Load(p string) *JSONConfig {
//LoadConfig 加载配置文件
func LoadConfig(p string) *JSONConfig {
if !PathExists(p) {
log.Warnf("尝试加载配置文件 %v 失败: 文件不存在", p)
return nil

View File

@ -469,7 +469,7 @@ func restart(Args []string) {
func getConfig() *global.JSONConfig {
var conf *global.JSONConfig
if global.PathExists("config.json") {
conf = global.Load("config.json")
conf = global.LoadConfig("config.json")
_ = conf.Save("config.hjson")
_ = os.Remove("config.json")
} else if os.Getenv("UIN") != "" {
@ -498,7 +498,7 @@ func getConfig() *global.JSONConfig {
conf.HTTPConfig.PostUrls[post] = os.Getenv("HTTP_SECRET")
}
} else {
conf = global.Load("config.hjson")
conf = global.LoadConfig("config.hjson")
}
if conf == nil {
err := global.WriteAllText("config.hjson", global.DefaultConfigWithComments)

View File

@ -333,7 +333,7 @@ func GetConf() *global.JSONConfig {
if JSONConfig != nil {
return JSONConfig
}
conf := global.Load("config.hjson")
conf := global.LoadConfig("config.hjson")
return conf
}