diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2016-07-04 09:49:41 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2016-07-04 09:49:41 +0900 |
commit | ffb805ca09df9530c806a25b86cadb48892fa40f (patch) | |
tree | 236e0a6a41de43e7662f424b33e459767b7ae5da /template/go | |
parent | 58b5595f88909e9d45eb338e31d2952a8e1d9c8f (diff) | |
download | vim-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.stpl | 18 |
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_}} |