diff options
Diffstat (limited to 'template')
-rw-r--r-- | template/go/snip-err-log-fatal.go | 3 | ||||
-rw-r--r-- | template/go/snip-err-return.go | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/template/go/snip-err-log-fatal.go b/template/go/snip-err-log-fatal.go new file mode 100644 index 0000000..48a2c6b --- /dev/null +++ b/template/go/snip-err-log-fatal.go @@ -0,0 +1,3 @@ +if err != nil { + log.Fatal(err) +} diff --git a/template/go/snip-err-return.go b/template/go/snip-err-return.go new file mode 100644 index 0000000..4936685 --- /dev/null +++ b/template/go/snip-err-return.go @@ -0,0 +1,3 @@ +if err != nil { + return err +} |