From 8006112de9cfd32e79e777615c04712d8689530c Mon Sep 17 00:00:00 2001 From: Dan Simmons Date: Sun, 17 Nov 2013 01:33:15 -0500 Subject: [PATCH] Added a few useful Go snippets that I've been using locally. --- UltiSnips/go.snippets | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/UltiSnips/go.snippets b/UltiSnips/go.snippets index ea46931..423b96b 100644 --- a/UltiSnips/go.snippets +++ b/UltiSnips/go.snippets @@ -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/(.+)/ /}{ @@ -104,4 +116,8 @@ var ( ) endsnippet +snippet json "JSON field" +\`json:"${1:displayName}"\` +endsnippet + # vim:ft=snippets: