-
Notifications
You must be signed in to change notification settings - Fork 645
Conversation
Hi @vIRu, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
@@ -156,6 +156,10 @@ | |||
"prefix": "tf", | |||
"body": "func Test$1(t *testing.T) {\n\t$0\n}" | |||
}, | |||
"benchmark function": { | |||
"prefix": "bf", | |||
"body": "func Benchmark$1(b *testing.B) {\n\tfor n := 0; n < b.N; n++ {\n\t\t$0\n\t}\n}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow to change the variable n
in the for loop here just like the for loop snippet. And name it i
or index
to begin with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will change n
to i
, but allowing to change that variable doesn't make sense for benchmark functions as Go chooses value of b.N
on its own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed.
3f37494
to
3b58e32
Compare
@vIRu The latest update 0.6.51 has your snippet. Thanks for your contribution! |
* 'master' of github.com:mattetti/vscode-go: (128 commits) Add telemetry support for the Go extension Add dlv path to error msg when dlv not found Fixes microsoft#465 outline offset problem in No-English language (microsoft#699) fix coverage display when editor changes to undefined (microsoft#693) Add support for reading http.proxy setting (microsoft#639) Fixing flaky unit tests Refactor for corner cases Reduce noise in console log due to errors from hover Changelog for next update 0.6.51 Remove space after brackets in snippet as per microsoft#628 Fixes microsoft#647 Strip version from autocompleted pkgs from gopkg.in (microsoft#659) Fixes microsoft#647 Support vendor pkgs from root of GOPATH/src (microsoft#660) Fixes microsoft#640 Use spawn to handle big data from gocode (microsoft#661) Fixed wrong workspace when one gopath is the substring of another. (microsoft#658) Fix "gotests" when generates test for current function for type methods (microsoft#657) Add benchmark function snippet (microsoft#648) Fix "Go to Definition" when running Go HEAD (microsoft#655) Fixes microsoft#642 Only add -d once to formatflags (microsoft#644) Updating Changelog and package.json for 0.6.50 update Log errors to console ...
Analogical to existing
tf
snippet.