Skip to content

Commit 54ca21a

Browse files
author
Simeon F. Willbanks
committed
Refactor variable snippets
* "v" is for shorthand variable declaration * "vr" is for variable initialization * "var" is for longhand variable declaration * "vars" is for multiple variable declarations
1 parent deffc63 commit 54ca21a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

snippets/go.snippets

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
# variables
1+
# shorthand variable declaration
22
snippet v
33
${1} := ${2}
4+
# variable initialization
45
snippet vr
6+
var ${1:t} ${0:string}
7+
# variable declaration
8+
snippet var
59
var ${1} ${2} = ${3}
10+
# variables declaration
11+
snippet vars
12+
var (
13+
${1} ${2} = ${3}
14+
)
615
# append
716
snippet ap
817
append(${1:slice}, ${0:value})

0 commit comments

Comments
 (0)