aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Odeke <emm.odeke@gmail.com>2016-09-25 16:18:28 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2016-09-26 00:04:34 +0000
commit0c6fd7cf344f3818f90ee21f5c0506c2ebe6cc0c (patch)
tree6455b4a7aa57f20b6ade39a2b3cfd0af954eb3c3
parenta317451f36b22672c8a079489aa5425b9fa3a9da (diff)
content: update context article to use stdlib import path
Updated context article to use stdlib import path. Updated package-names article to reflect that context is now in stdlib, and added x/time/rate as an example for a longer package name. Fixes golang/go#15562 Change-Id: I58d495527037f5201897825ca11f484561997277 Reviewed-on: https://go-review.googlesource.com/29759 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
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.