Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 418b59e

Browse files
committed
Merge pull request honza#249 from simeonwillbanks/master
Add Go snippets for invoking named and anonymous functions in goroutines
2 parents 8a0cd14 + e688bfe commit 418b59e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

snippets/go.snippets

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,11 @@ snippet t
211211
# variable declaration
212212
snippet v
213213
var ${1:t} ${2:string}
214+
# goroutine named function
215+
snippet g
216+
go ${1:funcName}(${2})
217+
# goroutine anonymous function
218+
snippet ga
219+
go func(${1} ${2:type}) {
220+
${3:/* code */}
221+
}(${4})

0 commit comments

Comments
 (0)