Skip to content

Rename go variable snippets #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions snippets/go.snippets
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# variables
# shorthand variable declaration
snippet v
${1} := ${2}
# variable initialization
snippet vr
var ${1:t} ${0:string}
# variable declaration
snippet var
var ${1} ${2} = ${3}
# variables declaration
snippet vars
var (
${1} ${2} = ${3}
)
# append
snippet ap
append(${1:slice}, ${0:value})
Expand Down Expand Up @@ -213,9 +222,6 @@ snippet sp
# true
snippet t
true
# variable declaration
snippet v
var ${1:t} ${0:string}
# goroutine named function
snippet g
go ${1:funcName}(${0})
Expand Down