From fe3d28ee78248d5cf375d1ced60914339ca1c3bb Mon Sep 17 00:00:00 2001 From: David Florness Date: Fri, 31 Dec 2021 19:06:35 -0600 Subject: [PATCH] Properly close file --- cmd/tallyard/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/tallyard/main.go b/cmd/tallyard/main.go index b294908..a4b0391 100644 --- a/cmd/tallyard/main.go +++ b/cmd/tallyard/main.go @@ -38,6 +38,7 @@ func main() { if err == nil { log.SetLevel(log.DebugLevel) log.SetOutput(file) + defer file.Close() } else { log.Errorf("failed to open logging file; using default stderr: %s", err) } -- 2.38.4