diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2023-08-13 13:59:58 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2023-08-13 13:59:58 +0100 |
| commit | 07276515b0593331720ee4fe307b65d5cfeb7cbf (patch) | |
| tree | 05225ddc07965d3773eb26b796d93ce638fa6e42 | |
| parent | 1b3667a9b3c038c6c501f229b6c7ea2b77ed7698 (diff) | |
Close configuration file after loading it
| -rw-r--r-- | main.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) |
