Skip to content

Commit

Permalink
tour: link to time doc for After/Tick
Browse files Browse the repository at this point in the history
On the tour slide "tour/concurrency/6" ("Default Selection") the example
code in "default-selection.go" uses time.After() and time.Tick() without
any mention of what they do. A link to the time fuctions doc can provide
context to understand what those do.

Add link to time#pkg-functions on slide next to code using
time.After()/Tick().

Fixes golang/tour#1466
  • Loading branch information
crisman committed Mar 24, 2023
1 parent 710879a commit 655fec7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _content/tour/concurrency.article
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ Use a `default` case to try a send or receive without blocking:
// receiving from c would block
}

The [[https://pkg.go.dev/time#pkg-functions][`time` package documentation]] may be helpful.

.play concurrency/default-selection.go

* Exercise: Equivalent Binary Trees
Expand Down

0 comments on commit 655fec7

Please sign in to comment.