From f6571375fd13cafe9e060103795db93a956cfaf6 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Fri, 28 Sep 2018 18:42:40 +0900 Subject: add close/query --- template/go/pattern.stpl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'template') diff --git a/template/go/pattern.stpl b/template/go/pattern.stpl index 8bfb8b8..db46c5d 100644 --- a/template/go/pattern.stpl +++ b/template/go/pattern.stpl @@ -16,3 +16,10 @@ \(\S\+\)\.log$ log.Println({{$1}}) {{_cursor_}} + +\(\S\+\)\.close$ + defer {{$1}}.Close() + {{_cursor_}} + +\(\S\+\)\.query$ + {{$1}}.Query("{{_cursor_}}") -- cgit v1.2.3-54-g00ecf