aboutsummaryrefslogtreecommitdiff
path: root/template/go
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2016-07-04 09:49:41 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2016-07-04 09:49:41 +0900
commitffb805ca09df9530c806a25b86cadb48892fa40f (patch)
tree236e0a6a41de43e7662f424b33e459767b7ae5da /template/go
parent58b5595f88909e9d45eb338e31d2952a8e1d9c8f (diff)
downloadvim-sonictemplate-ffb805ca09df9530c806a25b86cadb48892fa40f.tar.gz
vim-sonictemplate-ffb805ca09df9530c806a25b86cadb48892fa40f.tar.bz2
vim-sonictemplate-ffb805ca09df9530c806a25b86cadb48892fa40f.zip
add postfix for go
Diffstat (limited to 'template/go')
-rw-r--r--template/go/pattern.stpl18
1 files changed, 18 insertions, 0 deletions
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_}}