diff options
Diffstat (limited to 'template/go/pattern.stpl')
-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_}} |