Only print the func if there is a function to print!
This commit is contained in:
parent
d69f58cd6b
commit
3b765d9236
1 changed files with 4 additions and 1 deletions
5
main.go
5
main.go
|
|
@ -22,5 +22,8 @@ func main() {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
(<-printUpdateMessage)()
|
||||
printFunc := <-printUpdateMessage
|
||||
if printFunc != nil {
|
||||
printFunc()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue