From 07276515b0593331720ee4fe307b65d5cfeb7cbf Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sun, 13 Aug 2023 13:59:58 +0100 Subject: Close configuration file after loading it --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 5a000b3..b1a29a1 100644 --- a/main.go +++ b/main.go @@ -34,6 +34,9 @@ func main() { if err != nil { log.Fatalf("Could not load the configuration: %v.", err) } + if err := fd.Close(); err != nil { + log.Printf("Failed to close configuration file: %v.", err) + } done := make(chan os.Signal, 1) signal.Notify(done, os.Interrupt, unix.SIGTERM) -- cgit v1.2.3-70-g09d2