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
|
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:
|
||||||
|
Loading…
Reference in New Issue
Block a user