mirror of
https://github.com/golang/go
synced 2024-11-21 16:04:45 -07:00
doc: use time.Duration in Effective Go.
R=golang-dev, r CC=golang-dev https://golang.org/cl/5841044
This commit is contained in:
parent
e57a6167b6
commit
e5cc09a75d
@ -2357,7 +2357,7 @@ go list.Sort() // run list.Sort in parallel; don't wait for it.
|
||||
<p>
|
||||
A function literal can be handy in a goroutine invocation.
|
||||
<pre>
|
||||
func Announce(message string, delay int64) {
|
||||
func Announce(message string, delay time.Duration) {
|
||||
go func() {
|
||||
time.Sleep(delay)
|
||||
fmt.Println(message)
|
||||
|
Loading…
Reference in New Issue
Block a user