sijirama revised this gist . Go to revision
1 file changed, 7 insertions
main.go(file created)
@@ -0,0 +1,7 @@ | |||
1 | + | // favourite golang snippet for error handing right now | |
2 | + | ||
3 | + | func must(action string, err error) { | |
4 | + | if err != nil { | |
5 | + | panic("-> Failed to " + action + ": " + err.Error()) | |
6 | + | } | |
7 | + | } |
Newer
Older