From 92bcbe8acc03171ac0f4cc473d54546a2310473b Mon Sep 17 00:00:00 2001 From: Mark McGranaghan Date: Thu, 11 Oct 2012 08:39:34 -0700 Subject: [PATCH] tweaks --- examples/goroutines/goroutines.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/goroutines/goroutines.go b/examples/goroutines/goroutines.go index e7e47c4..d5ee5af 100644 --- a/examples/goroutines/goroutines.go +++ b/examples/goroutines/goroutines.go @@ -19,14 +19,14 @@ func main() { // To invoke this function in a goroutine, use // `go f(s)`. This new goroutine will execute - // concurrently with the current one. + // concurrently with the calling one. go f("goroutine") // You can also start a goroutine for an anonymous - // function. - go func() { - fmt.Println("going") - }() + // function call. + go func(msg string) { + fmt.Println(msg) + }("going") // Our two goroutines are running asynchronously in // separate goroutines now, so execution falls through