Merge pull request #112 from dsimmons/enhancement/go-snippets
go: added struct, json and interface snippets.
This commit is contained in:
commit
ac45d98767
@ -31,6 +31,18 @@ const (
|
||||
)
|
||||
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
|
||||
snippet for "For loop" !b
|
||||
for ${1:condition}${1/(.+)/ /}{
|
||||
@ -110,4 +122,8 @@ var (
|
||||
)
|
||||
endsnippet
|
||||
|
||||
snippet json "JSON field"
|
||||
\`json:"${1:displayName}"\`
|
||||
endsnippet
|
||||
|
||||
# vim:ft=snippets:
|
||||
|
Loading…
Reference in New Issue
Block a user