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

fix code style.

This commit is contained in:
Mrs4s 2021-04-13 11:14:30 +08:00
parent cccf454500
commit 1aed38ac18
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7

View File

@ -134,7 +134,7 @@ func Get() *Config {
generateConfig() generateConfig()
os.Exit(0) os.Exit(0)
} }
defer file.Close() defer func() { _ = file.Close() }()
config = &Config{} config = &Config{}
if err = yaml.NewDecoder(file).Decode(config); err != nil { if err = yaml.NewDecoder(file).Decode(config); err != nil {
log.Fatal("配置文件不合法!", err) log.Fatal("配置文件不合法!", err)