about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-05-06 01:19:52 -0400
committerBen Morrison <ben@gbmor.dev>2020-05-06 01:19:52 -0400
commit37a70e019e1aca4bdd652e2b8d8fa20e7be35734 (patch)
tree1aac24e077ee5c48758ba845491ff509670a5fad
parentc759e1c8a0430bb5236cf1b086bdeacb42d707af (diff)
downloadapi-37a70e019e1aca4bdd652e2b8d8fa20e7be35734.tar.gz
minor change to checking if logfile closed properly on SIGINT
-rw-r--r--logging.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/logging.go b/logging.go
index cd05006..03773be 100644
--- a/logging.go
+++ b/logging.go
@@ -19,8 +19,7 @@ func initLogging(logChan <-chan struct{}) {
 		<-logChan
 		log.Printf("Closing log file ...")
 
-		err := logfile.Close()
-		if err != nil {
+		if err := logfile.Close(); err != nil {
 			log.SetOutput(os.Stderr)
 			log.Printf("Error closing log file: %s", err.Error())
 		}