From 4dae57d0a29a643fd11ac5f9c4a1b0f3d89911a8 Mon Sep 17 00:00:00 2001 From: Namit Date: Tue, 3 Mar 2015 16:32:08 -0800 Subject: [PATCH] Add HTTP handler in go.snippets --- UltiSnips/go.snippets | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UltiSnips/go.snippets b/UltiSnips/go.snippets index 539f960..ab3bcbd 100644 --- a/UltiSnips/go.snippets +++ b/UltiSnips/go.snippets @@ -111,6 +111,12 @@ func ${1:name}(${2:params})${3/(.+)/ /}${3:type} { } endsnippet +snippet funch "HTTP handler" b +func ${1:handler}(${2:w} http.ResponseWriter, ${3:r} *http.Request) { + ${0:${VISUAL}} +} +endsnippet + # types and variables snippet map "Map type" b map[${1:keytype}]${2:valtype}