Skip to content

Commit 940d31a

Browse files
author
Simeon Willbanks
committed
Merge pull request honza#291 from simeonwillbanks/rename-go-variable-snippets
Rename go variable snippets
2 parents f621635 + 54ca21a commit 940d31a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

snippets/go.snippets

+10-4
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})
@@ -213,9 +222,6 @@ snippet sp
213222
# true
214223
snippet t
215224
true
216-
# variable declaration
217-
snippet v
218-
var ${1:t} ${0:string}
219225
# goroutine named function
220226
snippet g
221227
go ${1:funcName}(${0})

0 commit comments

Comments
 (0)