Add HTTP handler in go.snippets
This commit is contained in:
parent
a942cbb2db
commit
4dae57d0a2
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user