Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Snippet improve for loop #2943

Closed
programmer04 opened this issue Dec 12, 2019 · 5 comments · Fixed by #3010
Closed

Snippet improve for loop #2943

programmer04 opened this issue Dec 12, 2019 · 5 comments · Fixed by #3010
Labels
good-first-issue help wanted snippets feature requests regarding addition of snippets

Comments

@programmer04
Copy link
Contributor

programmer04 commented Dec 12, 2019

Now snippet for for looks like that:

for index := 0; index < count; index++ {
		
}

but in most languages and in Go too, using i instead of index is a convention:

for i := 0; i < count; i++ {
		
}

for example, this is recommended here https://talks.golang.org/2014/names.slide#6
What do you think about it? I'll be happy to make a Pull Request 🙂

@ramya-rao-a
Copy link
Contributor

Thanks for reporting @programmer04

@stamblerre, @hyangah Thoughts?

@ramya-rao-a ramya-rao-a added snippets feature requests regarding addition of snippets under-discussion labels Jan 28, 2020
@stamblerre
Copy link
Contributor

That sounds quite reasonable to me. Short variable names are recommended in Go.

@ramya-rao-a
Copy link
Contributor

@programmer04 Please do go ahead and make a Pull Request :)

@programmer04
Copy link
Contributor Author

Thanks for answer, I made the PR #3010 🙂

@ramya-rao-a
Copy link
Contributor

This issue is fixed in the latest version (0.13.0) of this extension

Thanks for reporting and for the PR @programmer04 !

Happy Coding!

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 13, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
good-first-issue help wanted snippets feature requests regarding addition of snippets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants