diff options
-rw-r--r-- | content/context.article | 4 | ||||
-rw-r--r-- | content/package-names.article | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/content/context.article b/content/context.article index 1d121f3..42bcfc4 100644 --- a/content/context.article +++ b/content/context.article @@ -20,7 +20,7 @@ At Google, we developed a `context` package that makes it easy to pass request-scoped values, cancelation signals, and deadlines across API boundaries to all the goroutines involved in handling a request. The package is publicly available as -[[http://godoc.org/golang.org/x/net/context][golang.org/x/net/context]]. +[[https://golang.org/pkg/context][context]]. This article describes how to use the package and provides a complete working example. @@ -31,7 +31,7 @@ The core of the `context` package is the `Context` type: .code context/interface.go /A Context/,/^}/ (This description is condensed; the -[[http://godoc.org/golang.org/x/net/context][godoc]] is authoritative.) +[[https://golang.org/pkg/context][godoc]] is authoritative.) The `Done` method returns a channel that acts as a cancelation signal to functions running on behalf of the `Context`: when the channel is closed, the diff --git a/content/package-names.article b/content/package-names.article index 4ecc057..f0429a2 100644 --- a/content/package-names.article +++ b/content/package-names.article @@ -125,9 +125,10 @@ Client code uses the package path when importing the package. By convention, the last element of the package path is the package name: import ( - "fmt" // package fmt - "os/exec" // package exec - "golang.org/x/net/context" // package context + "context" // package context + "fmt" // package fmt + "golang.org/x/time/rate" // package rate + "os/exec" // package exec ) Build tools map package paths onto directories. |