summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-05-21 16:50:54 -0400
committerBen Morrison <ben@gbmor.dev>2019-05-21 16:50:54 -0400
commitd083ce6beaa5268848fe61f1b9a81ad8914f0bd2 (patch)
tree7a86721c83ad418bb8a382875ebddb75ebb1fd64
parentece8a01fb1ec9417c1fc433a665024cc52dbf183 (diff)
downloadgetwtxt-d083ce6beaa5268848fe61f1b9a81ad8914f0bd2.tar.gz
rename closeLog channel
-rw-r--r--init.go10
-rw-r--r--main.go2
2 files changed, 6 insertions, 6 deletions
diff --git a/init.go b/init.go
index 97a998c..8c96e72 100644
--- a/init.go
+++ b/init.go
@@ -27,7 +27,7 @@ var (
 var confObj = &configuration{}
 
 // signals to close the log file
-var closelog = make(chan bool, 1)
+var closeLog = make(chan bool, 1)
 
 // used to transmit database pointer after
 // initialization
@@ -149,7 +149,7 @@ func initLogging() {
 		// reloaded.
 		go func(logfile *os.File) {
 
-			<-closelog
+			<-closeLog
 			log.Printf("Closing log file ...\n")
 
 			err = logfile.Close()
@@ -168,7 +168,7 @@ func rebindConfig() {
 	// signal to close the log file then wait
 	confObj.mu.RLock()
 	if !confObj.stdoutLogging {
-		closelog <- true
+		closeLog <- true
 	}
 	confObj.mu.RUnlock()
 
@@ -250,12 +250,12 @@ func watchForInterrupt() {
 
 			if !confObj.stdoutLogging {
 				// signal to close the log file
-				closelog <- true
+				closeLog <- true
 			}
 
 			confObj.mu.RUnlock()
 			close(dbChan)
-			close(closelog)
+			close(closeLog)
 
 			// Let everything catch up
 			time.Sleep(100 * time.Millisecond)
diff --git a/main.go b/main.go
index 9c4a4ab..4d4ebd9 100644
--- a/main.go
+++ b/main.go
@@ -86,5 +86,5 @@ func main() {
 		log.Printf("%v\n", err)
 	}
 
-	closelog <- true
+	closeLog <- true
 }