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

spell mistake #4

Closed
ThomasMing0915 opened this issue Jun 9, 2022 · 1 comment
Closed

spell mistake #4

ThomasMing0915 opened this issue Jun 9, 2022 · 1 comment

Comments

@ThomasMing0915
Copy link

hello, i find one spell mistake in 100-go-mistakes at chapter 9 #63 - Not being careful with goroutines and loop variable.

in the code, use fmt.Print :

s := []int{1, 2, 3}

for _, i := range s {
        go func() {
                fmt.Print(i)
        }()
}

in the description, use fmt.Println:

it prints the value of i at the time fmt.Println is executed

@teivah
Copy link
Owner

teivah commented Jul 2, 2022

Ah good one. Thanks @ThomasMing0915, I fixed it.

@teivah teivah closed this as completed Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants