Skip to content

Commit 3d3200e

Browse files
authored
Merge pull request #13 from lotusirous/timeout-message
select timeout: fix message
2 parents e818027 + de33020 commit 3d3200e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

6-select-timeout/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ func boring(msg string) <-chan string { // <-chan string means receives-only cha
1414
c <- fmt.Sprintf("%s %d", msg, i)
1515
time.Sleep(time.Duration(rand.Intn(1500)) * time.Millisecond)
1616
}
17-
1817
}()
1918
return c // return a channel to caller.
2019
}
@@ -29,7 +28,7 @@ func main() {
2928
case s := <-c:
3029
fmt.Println(s)
3130
case <-timeout:
32-
fmt.Println("You talk too much.")
31+
fmt.Println("no response, you talk too slow")
3332
return
3433
}
3534
}

0 commit comments

Comments
 (0)