Add HTTP handler in go.snippets

This commit is contained in:
Namit 2015-03-03 16:32:08 -08:00
parent a942cbb2db
commit 4dae57d0a2

View File

@ -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}