From 4e746792f1e01badc066b67de9b91500c96db66d Mon Sep 17 00:00:00 2001 From: guangwu Date: Sat, 20 Apr 2024 21:51:43 +0800 Subject: [PATCH] fix: close file --- go/config/config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/go/config/config.go b/go/config/config.go index 5d65da4b9..536eb0c1f 100644 --- a/go/config/config.go +++ b/go/config/config.go @@ -639,6 +639,7 @@ func read(fileName string) (*Configuration, error) { if err != nil { return Config, err } + defer file.Close() decoder := json.NewDecoder(file) err = decoder.Decode(Config) if err == nil {