From 0c6fd7cf344f3818f90ee21f5c0506c2ebe6cc0c Mon Sep 17 00:00:00 2001 From: Emmanuel Odeke Date: Sun, 25 Sep 2016 16:18:28 -0700 Subject: 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 --- content/context.article | 4 ++-- 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. -- cgit v1.2.3