From ffb805ca09df9530c806a25b86cadb48892fa40f Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Mon, 4 Jul 2016 09:49:41 +0900 Subject: add postfix for go --- template/go/pattern.stpl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 template/go/pattern.stpl (limited to 'template/go') diff --git a/template/go/pattern.stpl b/template/go/pattern.stpl new file mode 100644 index 0000000..45c3b02 --- /dev/null +++ b/template/go/pattern.stpl @@ -0,0 +1,18 @@ +\(\S\+\)\.var$ + var {{$1}} = {{_cursor_}} + +\(\S\+\)\.iferr$ + if {{$1}} != nil { + return err + } + {{_cursor_}} + +\(\S\+\)\.fatal$ + if {{$1}} != nil { + log.Fatal(err) + } + {{_cursor_}} + +\(\S\+\)\.log$ + log.Println({{$1}}) + {{_cursor_}} -- cgit v1.2.3-54-g00ecf