From 22a777ac795c40fc79208b327be91c5b9fe2c8f0 Mon Sep 17 00:00:00 2001 From: guangwu Date: Mon, 6 May 2024 05:31:34 +0800 Subject: [PATCH] fix: close config file (#1531) Co-authored-by: M. Mert Yildiran --- config/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 25674390b..21c1f0a93 100644 --- a/config/config.go +++ b/config/config.go @@ -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