Merge pull request #112 from dsimmons/enhancement/go-snippets

go: added struct, json and interface snippets.
This commit is contained in:
Holger Rapp 2013-11-19 07:00:14 -08:00
commit ac45d98767

View File

@ -31,6 +31,18 @@ const (
) )
endsnippet endsnippet
snippet struct "Struct declaration" b
type ${1:Struct} struct {
${0:${VISUAL}}
}
endsnippet
snippet interface "Interface declaration" b
type ${1:Interface} interface {
${0:${VISUAL}}
}
endsnippet
# statements # statements
snippet for "For loop" !b snippet for "For loop" !b
for ${1:condition}${1/(.+)/ /}{ for ${1:condition}${1/(.+)/ /}{
@ -110,4 +122,8 @@ var (
) )
endsnippet endsnippet
snippet json "JSON field"
\`json:"${1:displayName}"\`
endsnippet
# vim:ft=snippets: # vim:ft=snippets: