mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-06 12:03:50 +08:00
parent
8506d7586f
commit
e3c06731e7
@ -122,9 +122,11 @@ func Get() *Config {
|
||||
file, err := os.Open(DefaultConfigFile)
|
||||
if err != nil {
|
||||
log.Error("获取配置文件失败: ", err)
|
||||
return
|
||||
}
|
||||
defer file.Close()
|
||||
config = &Config{}
|
||||
if yaml.NewDecoder(file).Decode(config) != nil {
|
||||
if err = yaml.NewDecoder(file).Decode(config); err != nil {
|
||||
log.Fatal("配置文件不合法!", err)
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user