Updated plugins
This commit is contained in:
1 parent
d195ccb777
commit
2cb073a57d
73 files changed
+1096
-523
No files matched your search
@@ -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}
|
||||
@@ -135,3 +141,10 @@ snippet json "JSON field"
|
||||
endsnippet
|
||||
|
||||
# vim:ft=snippets:
|
||||
|
||||
# error handling
|
||||
snippet err "Basic error handling" b
|
||||
if err != nil {
|
||||
log.${1:Fatal}(err)
|
||||
}
|
||||
endsnippet
|
||||
Reference in new issue
Block a user