From 0a50049b8b828c3235f80ecc2c95b936376cf763 Mon Sep 17 00:00:00 2001 From: Hiroaki Sano Date: Mon, 27 Jan 2020 23:10:38 +0900 Subject: Add err handling --- template/go/snip-err-log-fatal.go | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 template/go/snip-err-log-fatal.go (limited to 'template/go/snip-err-log-fatal.go') 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) +} -- cgit v1.2.3-54-g00ecf