Created
September 4, 2013 03:32
-
-
Save codeskyblue/6432491 to your computer and use it in GitHub Desktop.
what's the result?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "time" | |
var ss = []string{"foo", "bar"} | |
func main() { | |
for _, name := range ss { | |
go func(){ | |
fmt.Println(name) | |
}() | |
} | |
time.Sleep(1e9) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment