Skip to content
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

x/wiki: CommonMistakes mention loopvar change in section using-goroutines-on-loop-iterator-variables #65659

Open
sdavids opened this issue Feb 11, 2024 · 4 comments
Labels
Documentation NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@sdavids
Copy link

sdavids commented Feb 11, 2024

What is the URL of the page with the issue?

https://go.dev/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3.1 Safari/605.1.15

Screenshot

No response

What did you do?

--

What did you see happen?

--

What did you expect to see?

Mention Go 1.22 similar to https://go.dev/doc/faq#closures_and_goroutines#closures_and_goroutines

and/or rewrite to Go 1.22

@seankhliao seankhliao changed the title Common Mistakes; Go 1.22 loopvar x/website/_content/doc: mention loopvar change in faq section closures and goroutines Feb 11, 2024
@gopherbot gopherbot added this to the Unreleased milestone Feb 11, 2024
@seankhliao seankhliao changed the title x/website/_content/doc: mention loopvar change in faq section closures and goroutines x/wiki: CommonMistakes mention loopvar change in section using-goroutines-on-loop-iterator-variables Feb 11, 2024
@gopherbot
Copy link

Change https://go.dev/cl/563215 mentions this issue: TableDrivenTests: link to doc/faq for loopvar changes

@sdavids
Copy link
Author

sdavids commented Feb 11, 2024

I am unsure of the link deletion policy of go.dev but you might want to keep the https://go.dev/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables link.

Other Wiki pages (or websites) might reference the link.

Maybe keep the introduction and add a note that as of 1.22 there are no common mistakes?

@seankhliao
Copy link
Member

nothing else in the wiki references it, and it would be nice not to have so much duplication of information (the wiki link on go.dev is relatively new anyway).

@thanm thanm added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 12, 2024
@sdavids
Copy link
Author

sdavids commented Feb 12, 2024

https://github.com/golang/go/wiki/CommonMistakes#using-reference-to-loop-iterator-variable

https://bugzilla.mozilla.org/show_bug.cgi?id=1619047#c1 has a link to the redirect above which redirects to the deleted page.

But not my decision—just mentioning it 🤷‍♂️

@findleyr findleyr removed the website label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants