From ff0aa76fc1a0fcba4c854b5608db9a9b7542b88e Mon Sep 17 00:00:00 2001 From: wahaha Date: Fri, 15 Jun 2018 18:15:00 +0800 Subject: [PATCH] =?UTF-8?q?ch-1:06=E4=BF=AE=E6=AD=A3=E4=BE=8B=E5=AD=90?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BC=82=E5=B8=B8=E7=BC=A9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ch1-basic/ch1-06-goroutine.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ch1-basic/ch1-06-goroutine.md b/ch1-basic/ch1-06-goroutine.md index 37383cc..b69b0b8 100644 --- a/ch1-basic/ch1-06-goroutine.md +++ b/ch1-basic/ch1-06-goroutine.md @@ -567,7 +567,7 @@ func main() { func worker(cannel chan bool) { for { select { - default: + default: fmt.Println("hello") // 正常工作 case <-cannel: @@ -591,7 +591,7 @@ func main() { func worker(cannel chan bool) { for { select { - default: + default: fmt.Println("hello") // 正常工作 case <-cannel: @@ -620,7 +620,7 @@ func worker(wg *sync.WaitGroup, cannel chan bool) { for { select { - default: + default: fmt.Println("hello") case <-cannel: return @@ -863,10 +863,10 @@ func worker(ctx context.Context, wg *sync.WaitGroup) error { for { select { - default: + default: fmt.Println("hello") case <-ctx.Done(): - return ctx.Err() + return ctx.Err() } } }