1
0
mirror of https://github.com/golang/go synced 2024-11-19 12:34:47 -07:00

cmd/api: use golang.org/x/... import paths

LGTM=bradfitz, rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/169000043
This commit is contained in:
Andrew Gerrand 2014-11-10 09:13:04 +11:00
parent 03c008bcb2
commit 68e2dbe8b7
2 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ import (
"sort" "sort"
"strings" "strings"
"code.google.com/p/go.tools/go/types" "golang.org/x/tools/go/types"
) )
// Flags // Flags

View File

@ -91,7 +91,7 @@ func file(s ...string) string {
// It tries to re-use a go.tools checkout from a previous run if possible, // It tries to re-use a go.tools checkout from a previous run if possible,
// else it hg clones it. // else it hg clones it.
func prepGoPath() string { func prepGoPath() string {
const tempBase = "go.tools.TMP" const tempBase = "tools.TMP"
username := "" username := ""
u, err := user.Current() u, err := user.Current()
@ -108,14 +108,14 @@ func prepGoPath() string {
gopath := filepath.Join(os.TempDir(), "gopath-api-"+cleanUsername(username), goToolsVersion) gopath := filepath.Join(os.TempDir(), "gopath-api-"+cleanUsername(username), goToolsVersion)
// cloneDir is where we run "hg clone". // cloneDir is where we run "hg clone".
cloneDir := filepath.Join(gopath, "src", "code.google.com", "p") cloneDir := filepath.Join(gopath, "src", "golang.org", "x")
// The dir we clone into. We only atomically rename it to finalDir on // The dir we clone into. We only atomically rename it to finalDir on
// clone success. // clone success.
tmpDir := filepath.Join(cloneDir, tempBase) tmpDir := filepath.Join(cloneDir, tempBase)
// finalDir is where the checkout will live once it's complete. // finalDir is where the checkout will live once it's complete.
finalDir := filepath.Join(cloneDir, "go.tools") finalDir := filepath.Join(cloneDir, "tools")
if goToolsCheckoutGood(finalDir) { if goToolsCheckoutGood(finalDir) {
return gopath return gopath