From 3b765d9236131552404e748ec9ddafeb339f72aa Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Fri, 22 Nov 2019 13:48:19 -0800 Subject: [PATCH] Only print the func if there is a function to print! --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 80bf075c6..585e2bcce 100644 --- a/main.go +++ b/main.go @@ -22,5 +22,8 @@ func main() { os.Exit(1) } - (<-printUpdateMessage)() + printFunc := <-printUpdateMessage + if printFunc != nil { + printFunc() + } }