Only print the func if there is a function to print!

This commit is contained in:
Corey Johnson 2019-11-22 13:48:19 -08:00
parent d69f58cd6b
commit 3b765d9236

View file

@ -22,5 +22,8 @@ func main() {
os.Exit(1)
}
(<-printUpdateMessage)()
printFunc := <-printUpdateMessage
if printFunc != nil {
printFunc()
}
}