Created
April 20, 2016 01:07
-
-
Save dgrijalva/4add2e545b7cf84e8b6d42f38fc66841 to your computer and use it in GitHub Desktop.
The function I copy/paste into every go command line tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Like printf, but then it dies | |
func fatal(msg string, more ...interface{}) { | |
fmt.Fprintf(os.Stderr, msg+"\n", more...) | |
os.Exit(1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment