fix: close config file (#1531)

Co-authored-by: M. Mert Yildiran <me@mertyildiran.com>
This commit is contained in:
guangwu
2024-05-06 05:31:34 +08:00
committed by GitHub
parent 06e0def53e
commit 22a777ac79

View File

@@ -146,7 +146,8 @@ func loadConfigFile(config *ConfigStruct, silent bool) error {
} else {
ConfigFilePath = cwdConfig
}
defer reader.Close()
buf, err := io.ReadAll(reader)
if err != nil {
return err