diff options
author | Hiroaki Sano <hiroaki.sano.9stories@gmail.com> | 2020-01-27 23:10:38 +0900 |
---|---|---|
committer | Hiroaki Sano <hiroaki.sano.9stories@gmail.com> | 2020-01-27 23:54:13 +0900 |
commit | 0a50049b8b828c3235f80ecc2c95b936376cf763 (patch) | |
tree | 843cd20b259593939d2e36a4646b56929e113f8c /template/go | |
parent | 23716b7b708853a51b585e0a2f8c7bbc5e09d2a9 (diff) | |
download | vim-sonictemplate-0a50049b8b828c3235f80ecc2c95b936376cf763.tar.gz vim-sonictemplate-0a50049b8b828c3235f80ecc2c95b936376cf763.tar.bz2 vim-sonictemplate-0a50049b8b828c3235f80ecc2c95b936376cf763.zip |
Add err handling
Diffstat (limited to 'template/go')
-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 +} |