Commit 7f0be1f7 authored by Andrew Gerrand's avatar Andrew Gerrand

all: use golang.org/x/... import paths

LGTM=rsc, r
R=r, rsc
CC=golang-codereview, golang-codereviews
https://golang.org/cl/168050043
parent 68e2dbe8
......@@ -78,17 +78,18 @@ well-established conventions.</p>
source code. For Bitbucket, GitHub, Google Code, and Launchpad, the
root directory of the repository is identified by the repository's
main URL, without the <code>http://</code> prefix. Subdirectories are named by
adding to that path. For example, the supplemental networking
libraries for Go are obtained by running</p>
adding to that path.
For example, the Go example programs are obtained by running</p>
<pre>
hg clone http://code.google.com/p/go.net
git clone https://github.com/golang/example
</pre>
<p>and thus the import path for the root directory of that repository is
"<code>code.google.com/p/go.net</code>". The websocket package is stored in a
subdirectory, so its import path is
"<code>code.google.com/p/go.net/websocket</code>".</p>
"<code>github.com/golang/example</code>".
The <a href="https://godoc.org/github.com/golang/example/stringutil">stringutil</a>
package is stored in a subdirectory, so its import path is
"<code>github.com/golang/example/stringutil</code>".</p>
<p>These paths are on the long side, but in exchange we get an
automatically managed name space for import paths and the ability for
......
......@@ -62,7 +62,7 @@ details.
</tr>
<tr>
<td><a href="//godoc.org/code.google.com/p/go.tools/cmd/cover/">cover</a></td>
<td><a href="//godoc.org/golang.org/x/tools/cmd/cover/">cover</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>Cover is a program for creating and analyzing the coverage profiles
generated by <code>"go test -coverprofile"</code>.</td>
......@@ -83,13 +83,13 @@ gofmt</a> command with more general options.</td>
</tr>
<tr>
<td><a href="//godoc.org/code.google.com/p/go.tools/cmd/godoc/">godoc</a></td>
<td><a href="//godoc.org/golang.org/x/tools/cmd/godoc/">godoc</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>Godoc extracts and generates documentation for Go packages.</td>
</tr>
<tr>
<td><a href="//godoc.org/code.google.com/p/go.tools/cmd/vet/">vet</a></td>
<td><a href="//godoc.org/golang.org/x/tools/cmd/vet/">vet</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>Vet examines Go source code and reports suspicious constructs, such as Printf
calls whose arguments do not align with the format string.</td>
......
This diff is collapsed.
......@@ -121,7 +121,7 @@ are inside the go directory when issuing commands.
<p>To contribute to subrepositories, edit the <code>.hg/hgrc</code> for each
subrepository in the same way. For example, add the codereview extension to
<code>code.google.com/p/go.tools/.hg/hgrc</code>.
<code>golang.org/x/tools/.hg/hgrc</code>.
</p>
<h3>Understanding the extension</h3>
......
......@@ -153,7 +153,7 @@ developed software based on Go 1.
<p>
Code in sub-repositories of the main go tree, such as
<a href="//code.google.com/p/go.net">code.google.com/p/go.net</a>,
<a href="//golang.org/x/net">golang.org/x/net</a>,
may be developed under
looser compatibility requirements. However, the sub-repositories
will be tagged as appropriate to identify versions that are compatible
......@@ -170,9 +170,9 @@ is therefore outside the purview of the guarantees made here.
As of Go version 1.4, the <code>syscall</code> package is frozen.
Any evolution of the system call interface must be supported elsewhere,
such as in the
<a href="http://godoc.org/code.google.com/p/go.sys">go.sys</a> subrepository.
<a href="//golang.org/x/sys">go.sys</a> subrepository.
For details and background, see
<a href="https://golang.org/s/go1.4-syscall">this document</a>.
<a href="//golang.org/s/go1.4-syscall">this document</a>.
</p>
<h2 id="tools">Tools</h2>
......
......@@ -1616,7 +1616,7 @@ Go is a
fine language in which to implement a self-hosting compiler: a native lexer and
parser are already available in the <a href="/pkg/go/"><code>go</code></a> package
and a separate type checking
<a href="http://godoc.org/code.google.com/p/go.tools/go/types">package</a>
<a href="http://godoc.org/golang.org/x/tools/go/types">package</a>
has also been written.
</p>
......@@ -1715,7 +1715,7 @@ func main() {
<p>
Nowadays, most Go programmers use a tool,
<a href="http://godoc.org/code.google.com/p/go.tools/cmd/goimports">goimports</a>,
<a href="http://godoc.org/golang.org/x/tools/cmd/goimports">goimports</a>,
which automatically rewrites a Go source file to have the correct imports,
eliminating the unused imports issue in practice.
This program is easily connected to most editors to run automatically when a Go source file is written.
......
......@@ -241,12 +241,12 @@ provides <b>essential setup instructions</b> for using the Go tools.
<p>
The source code for several Go tools (including <a href="/cmd/godoc/">godoc</a>)
is kept in <a href="https://code.google.com/p/go.tools">the go.tools repository</a>.
is kept in <a href="https://golang.org/x/tools">the go.tools repository</a>.
To install all of them, run the <code>go</code> <code>get</code> command:
</p>
<pre>
$ go get code.google.com/p/go.tools/cmd/...
$ go get golang.org/x/tools/cmd/...
</pre>
<p>
......@@ -254,7 +254,7 @@ Or if you just want to install a specific command (<code>godoc</code> in this ca
</p>
<pre>
$ go get code.google.com/p/go.tools/cmd/godoc
$ go get golang.org/x/tools/cmd/godoc
</pre>
<p>
......
......@@ -1631,7 +1631,7 @@ def clpatch_or_undo(ui, repo, clname, opts, mode):
try:
cmd = subprocess.Popen(argv, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=None, close_fds=sys.platform != "win32")
except:
return "hgapplydiff: " + ExceptionDetail() + "\nInstall hgapplydiff with:\n$ go get code.google.com/p/go.codereview/cmd/hgapplydiff\n"
return "hgapplydiff: " + ExceptionDetail() + "\nInstall hgapplydiff with:\n$ go get golang.org/x/codereview/cmd/hgapplydiff\n"
out, err = cmd.communicate(patch)
if cmd.returncode != 0 and not opts["ignore_hgapplydiff_failure"]:
......
#!/bin/bash
echo 'misc/benchcmp has moved:' >&2
echo ' go get -u code.google.com/p/go.tools/cmd/benchcmp' >&2
echo ' go get -u golang.org/x/tools/cmd/benchcmp' >&2
exit 2
......@@ -53,8 +53,8 @@ var (
)
const (
blogPath = "code.google.com/p/go.blog"
toolPath = "code.google.com/p/go.tools"
blogPath = "golang.org/x/blog"
toolPath = "golang.org/x/tools"
tourPath = "code.google.com/p/go-tour"
defaultToolTag = "release-branch.go1.3"
defaultTourTag = "release-branch.go1.3"
......@@ -64,9 +64,9 @@ const (
// These must be the command that cmd/go knows to install to $GOROOT/bin
// or $GOROOT/pkg/tool.
var toolPaths = []string{
"code.google.com/p/go.tools/cmd/cover",
"code.google.com/p/go.tools/cmd/godoc",
"code.google.com/p/go.tools/cmd/vet",
"golang.org/x/tools/cmd/cover",
"golang.org/x/tools/cmd/godoc",
"golang.org/x/tools/cmd/vet",
}
var preBuildCleanFiles = []string{
......
......@@ -11,7 +11,7 @@
// two non-literal codes are a clear code and an EOF code.
//
// The TIFF file format uses a similar but incompatible version of the LZW
// algorithm. See the code.google.com/p/go.image/tiff/lzw package for an
// algorithm. See the golang.org/x/image/tiff/lzw package for an
// implementation.
package lzw
......
......@@ -21,7 +21,7 @@ func (h Hash) HashFunc() Hash {
}
const (
MD4 Hash = 1 + iota // import code.google.com/p/go.crypto/md4
MD4 Hash = 1 + iota // import golang.org/x/crypto/md4
MD5 // import crypto/md5
SHA1 // import crypto/sha1
SHA224 // import crypto/sha256
......@@ -29,11 +29,11 @@ const (
SHA384 // import crypto/sha512
SHA512 // import crypto/sha512
MD5SHA1 // no implementation; MD5+SHA1 used for TLS RSA
RIPEMD160 // import code.google.com/p/go.crypto/ripemd160
SHA3_224 // import code.google.com/p/go.crypto/sha3
SHA3_256 // import code.google.com/p/go.crypto/sha3
SHA3_384 // import code.google.com/p/go.crypto/sha3
SHA3_512 // import code.google.com/p/go.crypto/sha3
RIPEMD160 // import golang.org/x/crypto/ripemd160
SHA3_224 // import golang.org/x/crypto/sha3
SHA3_256 // import golang.org/x/crypto/sha3
SHA3_384 // import golang.org/x/crypto/sha3
SHA3_512 // import golang.org/x/crypto/sha3
maxHash
)
......
......@@ -12,7 +12,7 @@ var importPathToPrefixTests = []struct {
}{
{"runtime", "runtime"},
{"sync/atomic", "sync/atomic"},
{"code.google.com/p/go.tools/godoc", "code.google.com/p/go.tools/godoc"},
{"golang.org/x/tools/godoc", "golang.org/x/tools/godoc"},
{"foo.bar/baz.quux", "foo.bar/baz%2equux"},
{"", ""},
{"%foo%bar", "%25foo%25bar"},
......
......@@ -30,7 +30,7 @@ import (
// set a cookie for bar.com.
//
// A public suffix list implementation is in the package
// code.google.com/p/go.net/publicsuffix.
// golang.org/x/net/publicsuffix.
type PublicSuffixList interface {
// PublicSuffix returns the public suffix of domain.
//
......
......@@ -9,7 +9,7 @@
// Export the runtime entry point symbol.
//
// Used by the app package to start the Go runtime after loading
// a shared library via JNI. See code.google.com/p/go.mobile/app.
// a shared library via JNI. See golang.org/x/mobile/app.
void _rt0_arm_linux1();
#pragma cgo_export_static _rt0_arm_linux1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment