go.tools: use golang.org/x/... import paths

Rewrite performed with this command:
  sed -i '' 's_code.google.com/p/go\._golang.org/x/_g' \
    $(grep -lr 'code.google.com/p/go.' *)

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/170920043
This commit is contained in:
Andrew Gerrand 2014-11-10 08:50:40 +11:00
Родитель 3191bbae17
Коммит 5ebbcd132f
206 изменённых файлов: 444 добавлений и 444 удалений

Просмотреть файл

@ -18,7 +18,7 @@ import (
"strings"
"testing"
"code.google.com/p/go.tools/astutil"
"golang.org/x/tools/astutil"
)
// pathToString returns a string containing the concrete types of the

Просмотреть файл

@ -20,8 +20,8 @@ import (
"strings"
"time"
"code.google.com/p/go.tools/blog/atom"
"code.google.com/p/go.tools/present"
"golang.org/x/tools/blog/atom"
"golang.org/x/tools/present"
)
var validJSONPFunc = regexp.MustCompile(`(?i)^[a-z_][a-z0-9_.]*$`)

Просмотреть файл

@ -17,7 +17,7 @@ import (
"path/filepath"
"text/tabwriter"
"code.google.com/p/go.tools/cover"
"golang.org/x/tools/cover"
)
// funcOutput takes two file names as arguments, a coverage profile to read as input and an output

Просмотреть файл

@ -17,7 +17,7 @@ import (
"path/filepath"
"runtime"
"code.google.com/p/go.tools/cover"
"golang.org/x/tools/cover"
)
// htmlOutput reads the profile data from profile and generates an HTML

Просмотреть файл

@ -74,7 +74,7 @@ Example usage:
Show the transitive closure of imports of the digraph tool itself:
% go list -f '{{.ImportPath}}{{.Imports}}' ... | tr '[]' ' ' |
digraph forward code.google.com/p/go.tools/cmd/digraph
digraph forward golang.org/x/tools/cmd/digraph
Show which clothes (see above) must be donned before a jacket:
% digraph reverse jacket <clothes.txt

Просмотреть файл

@ -12,8 +12,8 @@ import (
"path/filepath"
"strings"
"code.google.com/p/go.tools/go/loader"
"code.google.com/p/go.tools/refactor/eg"
"golang.org/x/tools/go/loader"
"golang.org/x/tools/refactor/eg"
)
var (

Просмотреть файл

@ -21,7 +21,7 @@
//
// godex automatically tries all possible package path prefixes if only a
// partial package path is given. For instance, for the path "go/types",
// godex prepends "code.google.com/p/go.tools".
// godex prepends "golang.org/x/tools".
//
// The prefixes are computed by searching the directories specified by
// the GOROOT and GOPATH environment variables (and by excluding the

Просмотреть файл

@ -7,7 +7,7 @@
package main
import (
"code.google.com/p/go.tools/go/gcimporter"
"golang.org/x/tools/go/gcimporter"
)
func init() {

Просмотреть файл

@ -7,8 +7,8 @@
package main
import (
"code.google.com/p/go.tools/go/gccgoimporter"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/gccgoimporter"
"golang.org/x/tools/go/types"
)
var (

Просмотреть файл

@ -14,7 +14,7 @@ import (
"path/filepath"
"strings"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
var (

Просмотреть файл

@ -11,8 +11,8 @@ import (
"io"
"math/big"
"code.google.com/p/go.tools/go/exact"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/exact"
"golang.org/x/tools/go/types"
)
// TODO(gri) use tabwriter for alignment?

Просмотреть файл

@ -7,7 +7,7 @@
package main
import (
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
func init() {

Просмотреть файл

@ -12,7 +12,7 @@
package main
import "code.google.com/p/go.tools/go/types"
import "golang.org/x/tools/go/types"
func (p *printer) writeType(this *types.Package, typ types.Type) {
p.writeTypeInternal(this, typ, make([]types.Type, 8))

Просмотреть файл

@ -10,7 +10,7 @@ Prerequisites
* Go sources at tip under $GOROOT
* Godoc sources at tip inside $GOPATH
(go get -d code.google.com/p/go.tools/cmd/godoc)
(go get -d golang.org/x/tools/cmd/godoc)
Directory structure
@ -23,7 +23,7 @@ Directory structure
app-engine release and version of godoc):
app.yaml
code.google.com/p/go.tools/cmd/godoc
golang.org/x/tools/cmd/godoc
godoc.zip
index.split.*

Просмотреть файл

@ -14,11 +14,11 @@ import (
"log"
"path"
"code.google.com/p/go.tools/godoc"
"code.google.com/p/go.tools/godoc/static"
"code.google.com/p/go.tools/godoc/vfs"
"code.google.com/p/go.tools/godoc/vfs/mapfs"
"code.google.com/p/go.tools/godoc/vfs/zipfs"
"golang.org/x/tools/godoc"
"golang.org/x/tools/godoc/static"
"golang.org/x/tools/godoc/vfs"
"golang.org/x/tools/godoc/vfs/mapfs"
"golang.org/x/tools/godoc/vfs/zipfs"
)
func init() {

Просмотреть файл

@ -15,12 +15,12 @@ import (
"strings"
"sync"
"code.google.com/p/go.tools/blog"
"code.google.com/p/go.tools/godoc/redirect"
"golang.org/x/tools/blog"
"golang.org/x/tools/godoc/redirect"
)
const (
blogRepo = "code.google.com/p/go.blog"
blogRepo = "golang.org/x/blog"
blogURL = "http://blog.golang.org/"
blogPath = "/blog/"
)

Просмотреть файл

@ -29,8 +29,8 @@ import (
"text/template"
"unicode/utf8"
"code.google.com/p/go.tools/godoc"
"code.google.com/p/go.tools/godoc/vfs"
"golang.org/x/tools/godoc"
"golang.org/x/tools/godoc/vfs"
)
var codewalkHTML, codewalkdirHTML *template.Template

Просмотреть файл

@ -17,9 +17,9 @@ import (
"net/http"
"text/template"
"code.google.com/p/go.tools/godoc"
"code.google.com/p/go.tools/godoc/redirect"
"code.google.com/p/go.tools/godoc/vfs"
"golang.org/x/tools/godoc"
"golang.org/x/tools/godoc/redirect"
"golang.org/x/tools/godoc/vfs"
)
var (

Просмотреть файл

@ -44,18 +44,18 @@ import (
"runtime"
"strings"
"code.google.com/p/go.tools/godoc"
"code.google.com/p/go.tools/godoc/analysis"
"code.google.com/p/go.tools/godoc/static"
"code.google.com/p/go.tools/godoc/vfs"
"code.google.com/p/go.tools/godoc/vfs/gatefs"
"code.google.com/p/go.tools/godoc/vfs/mapfs"
"code.google.com/p/go.tools/godoc/vfs/zipfs"
"golang.org/x/tools/godoc"
"golang.org/x/tools/godoc/analysis"
"golang.org/x/tools/godoc/static"
"golang.org/x/tools/godoc/vfs"
"golang.org/x/tools/godoc/vfs/gatefs"
"golang.org/x/tools/godoc/vfs/mapfs"
"golang.org/x/tools/godoc/vfs/zipfs"
)
const (
defaultAddr = ":6060" // default webserver address
toolsPath = "code.google.com/p/go.tools/cmd/"
toolsPath = "golang.org/x/tools/cmd/"
)
var (

Просмотреть файл

@ -12,7 +12,7 @@ import (
// This package registers "/compile" and "/share" handlers
// that redirect to the golang.org playground.
_ "code.google.com/p/go.tools/playground"
_ "golang.org/x/tools/playground"
)
func init() {

Просмотреть файл

@ -21,7 +21,7 @@
ZIPFILE=godoc.zip
INDEXFILE=godoc.index
SPLITFILES=index.split.
GODOC=code.google.com/p/go.tools/cmd/godoc
GODOC=golang.org/x/tools/cmd/godoc
CONFIGFILE=$GODOC/appconfig.go
error() {

Просмотреть файл

@ -3,7 +3,7 @@
Command goimports updates your Go import lines,
adding missing ones and removing unreferenced ones.
$ go get code.google.com/p/go.tools/cmd/goimports
$ go get golang.org/x/tools/cmd/goimports
It's a drop-in replacement for your editor's gofmt-on-save hook.
It has the same command-line interface as gofmt and formats

Просмотреть файл

@ -17,7 +17,7 @@ import (
"runtime"
"strings"
"code.google.com/p/go.tools/imports"
"golang.org/x/tools/imports"
)
var (

Просмотреть файл

@ -10,7 +10,7 @@ import (
"os"
"runtime"
"code.google.com/p/go.tools/refactor/rename"
"golang.org/x/tools/refactor/rename"
)
var (

Просмотреть файл

@ -18,9 +18,9 @@ import (
"runtime"
"time"
"code.google.com/p/go.tools/go/gccgoimporter"
_ "code.google.com/p/go.tools/go/gcimporter"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/gccgoimporter"
_ "golang.org/x/tools/go/gcimporter"
"golang.org/x/tools/go/types"
)
var (

Просмотреть файл

@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// This program takes an HTML file and outputs a corresponding article file in
// present format. See: code.google.com/p/go.tools/present
// present format. See: golang.org/x/tools/present
package main
import (
@ -19,8 +19,8 @@ import (
"regexp"
"strings"
"code.google.com/p/go.net/html"
"code.google.com/p/go.net/html/atom"
"golang.org/x/net/html"
"golang.org/x/net/html/atom"
)
func main() {

Просмотреть файл

@ -21,7 +21,7 @@ function die() {
trap "rm -f $log" EXIT
# Build and install oracle.
go get code.google.com/p/go.tools/cmd/oracle || die "'go get' failed"
go get golang.org/x/tools/cmd/oracle || die "'go get' failed"
mv -f $GOPATH/bin/oracle $GOROOT/bin/
$GOROOT/bin/oracle >$log 2>&1 || true # (prints usage and exits 1)
grep -q "Run.*help" $log || die "$GOROOT/bin/oracle not installed"
@ -34,7 +34,7 @@ emacs --batch --no-splash --no-window-system --no-init \
--load $thisdir/oracle.el \
--eval '
(progn
(setq go-oracle-scope "code.google.com/p/go.tools/cmd/oracle")
(setq go-oracle-scope "golang.org/x/tools/cmd/oracle")
(find-file "'$thisdir'/main.go")
(search-forward "\"fmt\"")
(backward-char)

Просмотреть файл

@ -23,8 +23,8 @@ import (
"runtime"
"runtime/pprof"
"code.google.com/p/go.tools/go/loader"
"code.google.com/p/go.tools/oracle"
"golang.org/x/tools/go/loader"
"golang.org/x/tools/oracle"
)
var posFlag = flag.String("pos", "",
@ -69,8 +69,8 @@ The user manual is available here: http://golang.org/s/oracle-user-manual
Examples:
Describe the syntax at offset 530 in this file (an import spec):
% oracle -pos=src/code.google.com/p/go.tools/cmd/oracle/main.go:#530 describe \
code.google.com/p/go.tools/cmd/oracle
% oracle -pos=src/golang.org/x/tools/cmd/oracle/main.go:#530 describe \
golang.org/x/tools/cmd/oracle
Print the callgraph of the trivial web-server in JSON format:
% oracle -format=json $GOROOT/src/net/http/triv.go callgraph

Просмотреть файл

@ -3,7 +3,7 @@
;;;
;;; To install the Go oracle, run:
;;; % export GOROOT=... GOPATH=...
;;; % go get code.google.com/p/go.tools/cmd/oracle
;;; % go get golang.org/x/tools/cmd/oracle
;;; % mv $GOPATH/bin/oracle $GOROOT/bin/
;;;
;;; Load this file into Emacs and set go-oracle-scope to your

Просмотреть файл

@ -9,9 +9,9 @@ package main
import (
"mime"
"code.google.com/p/go.tools/present"
"golang.org/x/tools/present"
_ "code.google.com/p/go.tools/playground"
_ "golang.org/x/tools/playground"
)
var basePath = "./present/"

Просмотреть файл

@ -13,7 +13,7 @@ import (
"path/filepath"
"sort"
"code.google.com/p/go.tools/present"
"golang.org/x/tools/present"
)
func init() {

Просмотреть файл

@ -8,7 +8,7 @@ presents slide and article files from the current directory.
It may be run as a stand-alone command or an App Engine app.
Instructions for deployment to App Engine are in the README of the
code.google.com/p/go.tools repository.
golang.org/x/tools repository.
Usage of present:
-base="": base path for slide template and static resources
@ -26,6 +26,6 @@ the generated output. The supported formats are:
.article // article format, such as a blog post
The present file format is documented by the present package:
http://godoc.org/code.google.com/p/go.tools/present
http://godoc.org/golang.org/x/tools/present
*/
package main

Просмотреть файл

@ -18,11 +18,11 @@ import (
"runtime"
"strings"
"code.google.com/p/go.tools/playground/socket"
"code.google.com/p/go.tools/present"
"golang.org/x/tools/playground/socket"
"golang.org/x/tools/present"
)
const basePkg = "code.google.com/p/go.tools/cmd/present"
const basePkg = "golang.org/x/tools/cmd/present"
var basePath string

Просмотреть файл

@ -12,7 +12,7 @@ import (
"path/filepath"
"time"
"code.google.com/p/go.tools/godoc/static"
"golang.org/x/tools/godoc/static"
)
var scripts = []string{"jquery.js", "jquery-ui.js", "playground.js", "play.js"}

Просмотреть файл

@ -13,10 +13,10 @@ import (
"runtime"
"runtime/pprof"
"code.google.com/p/go.tools/go/loader"
"code.google.com/p/go.tools/go/ssa"
"code.google.com/p/go.tools/go/ssa/interp"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/loader"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/ssa/interp"
"golang.org/x/tools/go/types"
)
var buildFlag = flag.String("build", "", `Options controlling the SSA builder.

Просмотреть файл

@ -74,10 +74,10 @@ import (
"sort"
"strings"
"code.google.com/p/go.tools/go/exact"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/exact"
"golang.org/x/tools/go/types"
_ "code.google.com/p/go.tools/go/gcimporter"
_ "golang.org/x/tools/go/gcimporter"
)
var (
@ -91,7 +91,7 @@ func Usage() {
fmt.Fprintf(os.Stderr, "\tstringer [flags] -type T [directory]\n")
fmt.Fprintf(os.Stderr, "\tstringer [flags[ -type T files... # Must be a single package\n")
fmt.Fprintf(os.Stderr, "For more information, see:\n")
fmt.Fprintf(os.Stderr, "\thttp://godoc.org/code.google.com/p/go.tools/cmd/stringer\n")
fmt.Fprintf(os.Stderr, "\thttp://godoc.org/golang.org/x/tools/cmd/stringer\n")
fmt.Fprintf(os.Stderr, "Flags:\n")
flag.PrintDefaults()
os.Exit(2)

Просмотреть файл

@ -11,7 +11,7 @@ import (
"go/ast"
"strings"
"code.google.com/p/go.tools/cmd/vet/whitelist"
"golang.org/x/tools/cmd/vet/whitelist"
)
var compositeWhiteList = flag.Bool("compositewhitelist", true, "use composite white list; for testing only")

Просмотреть файл

@ -12,7 +12,7 @@ import (
"go/ast"
"go/token"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
func init() {

Просмотреть файл

@ -21,8 +21,8 @@ import (
"strconv"
"strings"
_ "code.google.com/p/go.tools/go/gcimporter"
"code.google.com/p/go.tools/go/types"
_ "golang.org/x/tools/go/gcimporter"
"golang.org/x/tools/go/types"
)
// TODO: Need a flag to set build tags when parsing the package.
@ -159,7 +159,7 @@ func Usage() {
fmt.Fprintf(os.Stderr, "\tvet [flags] directory...\n")
fmt.Fprintf(os.Stderr, "\tvet [flags] files... # Must be a single package\n")
fmt.Fprintf(os.Stderr, "For more information run\n")
fmt.Fprintf(os.Stderr, "\tgodoc code.google.com/p/go.tools/cmd/vet\n\n")
fmt.Fprintf(os.Stderr, "\tgodoc golang.org/x/tools/cmd/vet\n\n")
fmt.Fprintf(os.Stderr, "Flags:\n")
flag.PrintDefaults()
os.Exit(2)

Просмотреть файл

@ -13,7 +13,7 @@ import (
"go/ast"
"go/token"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
func init() {

Просмотреть файл

@ -15,8 +15,8 @@ import (
"strings"
"unicode/utf8"
"code.google.com/p/go.tools/go/exact"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/exact"
"golang.org/x/tools/go/types"
)
var printfuncs = flag.String("printfuncs", "", "comma-separated list of print function names to check")

Просмотреть файл

@ -35,7 +35,7 @@ import (
"go/ast"
"go/token"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
var strictShadowing = flag.Bool("shadowstrict", false, "whether to be strict about shadowing; can be noisy")

Просмотреть файл

@ -12,8 +12,8 @@ import (
"go/ast"
"go/token"
"code.google.com/p/go.tools/go/exact"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/exact"
"golang.org/x/tools/go/types"
)
func init() {

Просмотреть файл

@ -10,7 +10,7 @@ import (
"go/ast"
"go/token"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
// imports is the canonical map of imported packages we need for typechecking.

Просмотреть файл

@ -10,7 +10,7 @@ import (
"go/ast"
"go/token"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
func init() {

Просмотреть файл

@ -12,7 +12,7 @@ import (
"strings"
"testing"
"code.google.com/p/go.tools/container/intsets"
"golang.org/x/tools/container/intsets"
)
func TestBasics(t *testing.T) {

Просмотреть файл

@ -61,47 +61,47 @@ var goPackages = []*Package{
{
Kind: "subrepo",
Name: "go.blog",
Path: "code.google.com/p/go.blog",
Path: "golang.org/x/blog",
},
{
Kind: "subrepo",
Name: "go.codereview",
Path: "code.google.com/p/go.codereview",
Path: "golang.org/x/codereview",
},
{
Kind: "subrepo",
Name: "go.crypto",
Path: "code.google.com/p/go.crypto",
Path: "golang.org/x/crypto",
},
{
Kind: "subrepo",
Name: "go.exp",
Path: "code.google.com/p/go.exp",
Path: "golang.org/x/exp",
},
{
Kind: "subrepo",
Name: "go.image",
Path: "code.google.com/p/go.image",
Path: "golang.org/x/image",
},
{
Kind: "subrepo",
Name: "go.net",
Path: "code.google.com/p/go.net",
Path: "golang.org/x/net",
},
{
Kind: "subrepo",
Name: "go.sys",
Path: "code.google.com/p/go.sys",
Path: "golang.org/x/sys",
},
{
Kind: "subrepo",
Name: "go.talks",
Path: "code.google.com/p/go.talks",
Path: "golang.org/x/talks",
},
{
Kind: "subrepo",
Name: "go.tools",
Path: "code.google.com/p/go.tools",
Path: "golang.org/x/tools",
},
}

Просмотреть файл

@ -41,7 +41,7 @@ var testEntityKinds = []string{
"Log",
}
const testPkg = "code.google.com/p/go.test"
const testPkg = "golang.org/x/test"
var testPackage = &Package{Name: "Test", Kind: "subrepo", Path: testPkg}

Просмотреть файл

@ -15,7 +15,7 @@ import (
"runtime"
"strings"
"code.google.com/p/go.tools/go/vcs"
"golang.org/x/tools/go/vcs"
)
// builderEnv represents the environment that a Builder will run tests in.

Просмотреть файл

@ -22,7 +22,7 @@ import (
"strings"
"time"
"code.google.com/p/go.tools/go/vcs"
"golang.org/x/tools/go/vcs"
)
const (
@ -55,7 +55,7 @@ var (
buildTool = flag.String("tool", "go", "Tool to build.")
gcPath = flag.String("gcpath", "code.google.com/p/go", "Path to download gc from")
gccPath = flag.String("gccpath", "https://github.com/mirrors/gcc.git", "Path to download gcc from")
benchPath = flag.String("benchpath", "code.google.com/p/go.benchmarks/bench", "Path to download benchmarks from")
benchPath = flag.String("benchpath", "golang.org/x/benchmarks/bench", "Path to download benchmarks from")
failAll = flag.Bool("fail", false, "fail all builds")
parallel = flag.Bool("parallel", false, "Build multiple targets in parallel")
buildTimeout = flag.Duration("buildTimeout", 60*time.Minute, "Maximum time to wait for builds and tests")

Просмотреть файл

@ -14,7 +14,7 @@ import (
"strings"
"sync"
"code.google.com/p/go.tools/go/vcs"
"golang.org/x/tools/go/vcs"
)
// Repo represents a mercurial repository.

Просмотреть файл

@ -10,11 +10,11 @@ mkdir -p $GOROOT
curl -s https://storage.googleapis.com/gobuilder/go-snap.tar.gz | tar x --no-same-owner -zv -C $GOROOT
(cd $GOROOT/src && hg pull -r $GO_REV -u && find && ./make.bash)
GO_TOOLS=$GOPATH/src/code.google.com/p/go.tools
GO_TOOLS=$GOPATH/src/golang.org/x/tools
mkdir -p $GO_TOOLS
curl -s https://storage.googleapis.com/gobuilder/go.tools-snap.tar.gz | tar x --no-same-owner -zv -C $GO_TOOLS
mkdir -p $PREFIX/bin
(cd $GO_TOOLS && hg pull -r $BUILDER_REV -u && GOBIN=$PREFIX/bin /goroot/bin/go install code.google.com/p/go.tools/dashboard/builder)
(cd $GO_TOOLS && hg pull -r $BUILDER_REV -u && GOBIN=$PREFIX/bin /goroot/bin/go install golang.org/x/tools/dashboard/builder)
rm -fR $GOROOT/bin $GOROOT/pkg $GOPATH

Просмотреть файл

@ -10,11 +10,11 @@ mkdir -p $GOROOT
curl -s https://storage.googleapis.com/gobuilder/go-snap.tar.gz | tar x --no-same-owner -zv -C $GOROOT
(cd $GOROOT/src && hg pull -r $GO_REV -u && find && ./make.bash)
GO_TOOLS=$GOPATH/src/code.google.com/p/go.tools
GO_TOOLS=$GOPATH/src/golang.org/x/tools
mkdir -p $GO_TOOLS
curl -s https://storage.googleapis.com/gobuilder/go.tools-snap.tar.gz | tar x --no-same-owner -zv -C $GO_TOOLS
mkdir -p $PREFIX/bin
(cd $GO_TOOLS && hg pull -r $BUILDER_REV -u && GOBIN=$PREFIX/bin /goroot/bin/go install code.google.com/p/go.tools/dashboard/builder)
(cd $GO_TOOLS && hg pull -r $BUILDER_REV -u && GOBIN=$PREFIX/bin /goroot/bin/go install golang.org/x/tools/dashboard/builder)
rm -fR $GOROOT/bin $GOROOT/pkg $GOPATH

Просмотреть файл

@ -10,12 +10,12 @@ mkdir -p $GOROOT
curl -s https://storage.googleapis.com/gobuilder/go-snap.tar.gz | tar x --no-same-owner -zv -C $GOROOT
(cd $GOROOT/src && hg pull -r $GO_REV -u && find && ./make.bash)
GO_TOOLS=$GOPATH/src/code.google.com/p/go.tools
GO_TOOLS=$GOPATH/src/golang.org/x/tools
mkdir -p $GO_TOOLS
curl -s https://storage.googleapis.com/gobuilder/go.tools-snap.tar.gz | tar x --no-same-owner -zv -C $GO_TOOLS
mkdir -p $PREFIX/bin
(cd $GO_TOOLS && hg pull -r $BUILDER_REV -u && GOBIN=$PREFIX/bin /goroot/bin/go install code.google.com/p/go.tools/dashboard/builder)
(cd $GO_TOOLS && hg pull -r $BUILDER_REV -u && GOBIN=$PREFIX/bin /goroot/bin/go install golang.org/x/tools/dashboard/builder)
rm -fR $GOROOT/bin $GOROOT/pkg $GOPATH

Просмотреть файл

@ -10,11 +10,11 @@ mkdir -p $GOROOT
curl -s https://storage.googleapis.com/gobuilder/go-snap.tar.gz | tar x --no-same-owner -zv -C $GOROOT
(cd $GOROOT/src && hg pull -r $GO_REV -u && find && ./make.bash)
GO_TOOLS=$GOPATH/src/code.google.com/p/go.tools
GO_TOOLS=$GOPATH/src/golang.org/x/tools
mkdir -p $GO_TOOLS
curl -s https://storage.googleapis.com/gobuilder/go.tools-snap.tar.gz | tar x --no-same-owner -zv -C $GO_TOOLS
mkdir -p $PREFIX/bin
(cd $GO_TOOLS && hg pull -r $BUILDER_REV -u && GOBIN=$PREFIX/bin /goroot/bin/go install code.google.com/p/go.tools/dashboard/builder)
(cd $GO_TOOLS && hg pull -r $BUILDER_REV -u && GOBIN=$PREFIX/bin /goroot/bin/go install golang.org/x/tools/dashboard/builder)
rm -fR $GOROOT/bin $GOROOT/pkg $GOPATH

Просмотреть файл

@ -548,7 +548,7 @@ func readKey() (string, error) {
// subrepoList fetches a list of sub-repositories from the dashboard
// and returns them as a slice of base import paths.
// Eg, []string{"code.google.com/p/go.tools", "code.google.com/p/go.net"}.
// Eg, []string{"golang.org/x/tools", "golang.org/x/net"}.
func subrepoList() ([]string, error) {
r, err := http.Get(*dashboard + "packages?kind=subrepo")
if err != nil {

Просмотреть файл

@ -8,7 +8,7 @@ import (
"go/build"
"testing"
"code.google.com/p/go.tools/go/buildutil"
"golang.org/x/tools/go/buildutil"
)
func TestAllPackages(t *testing.T) {
@ -24,7 +24,7 @@ func TestAllPackages(t *testing.T) {
t.Errorf("Found only %d packages, want at least %d", len(all), wantAtLeast)
}
for _, want := range []string{"fmt", "crypto/sha256", "code.google.com/p/go.tools/go/buildutil"} {
for _, want := range []string{"fmt", "crypto/sha256", "golang.org/x/tools/go/buildutil"} {
if !set[want] {
t.Errorf("Package %q not found; got %s", want, all)
}

Просмотреть файл

@ -11,7 +11,7 @@ import (
"runtime"
"testing"
"code.google.com/p/go.tools/go/buildutil"
"golang.org/x/tools/go/buildutil"
)
func TestContainingPackage(t *testing.T) {
@ -23,8 +23,8 @@ func TestContainingPackage(t *testing.T) {
{goroot + "/src/fmt/print.go", "fmt"},
{goroot + "/src/encoding/json/foo.go", "encoding/json"},
{goroot + "/src/encoding/missing/foo.go", "(not found)"},
{gopath + "/src/code.google.com/p/go.tools/go/buildutil/util_test.go",
"code.google.com/p/go.tools/go/buildutil"},
{gopath + "/src/golang.org/x/tools/go/buildutil/util_test.go",
"golang.org/x/tools/go/buildutil"},
} {
file, want := test[0], test[1]
bp, err := buildutil.ContainingPackage(&build.Default, ".", file)

Просмотреть файл

@ -43,7 +43,7 @@ import (
"fmt"
"go/token"
"code.google.com/p/go.tools/go/ssa"
"golang.org/x/tools/go/ssa"
)
// A Graph represents a call graph.

Просмотреть файл

@ -4,7 +4,7 @@
package callgraph
import "code.google.com/p/go.tools/go/ssa"
import "golang.org/x/tools/go/ssa"
// This file provides various utilities over call graphs, such as
// visitation and path search.

Просмотреть файл

@ -11,7 +11,7 @@ import (
"path/filepath"
"strings"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
// Information about a specific installation of gccgo.

Просмотреть файл

@ -8,7 +8,7 @@ import (
"runtime"
"testing"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
var importablePackages = [...]string{

Просмотреть файл

@ -16,8 +16,8 @@ import (
"path/filepath"
"strings"
"code.google.com/p/go.tools/go/importer"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/importer"
"golang.org/x/tools/go/types"
)
// A PackageInit describes an imported package that needs initialization.

Просмотреть файл

@ -12,7 +12,7 @@ import (
"runtime"
"testing"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
type importerTest struct {

Просмотреть файл

@ -14,8 +14,8 @@ import (
"strings"
"text/scanner"
"code.google.com/p/go.tools/go/exact"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/exact"
"golang.org/x/tools/go/types"
)
type parser struct {

Просмотреть файл

@ -10,7 +10,7 @@ import (
"testing"
"text/scanner"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
var typeParserTests = []struct {

Просмотреть файл

@ -19,8 +19,8 @@ import (
"strings"
"text/scanner"
"code.google.com/p/go.tools/go/exact"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/exact"
"golang.org/x/tools/go/types"
)
// debugging/development support

Просмотреть файл

@ -15,7 +15,7 @@ import (
"testing"
"time"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
var gcPath string // Go compiler path

Просмотреть файл

@ -11,8 +11,8 @@ import (
"go/ast"
"strings"
"code.google.com/p/go.tools/go/exact"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/exact"
"golang.org/x/tools/go/types"
)
// debugging support

Просмотреть файл

@ -14,8 +14,8 @@ import (
"fmt"
"go/token"
"code.google.com/p/go.tools/go/exact"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/exact"
"golang.org/x/tools/go/types"
)
// ImportData imports a package from the serialized package data

Просмотреть файл

@ -20,8 +20,8 @@ import (
"testing"
"time"
"code.google.com/p/go.tools/go/gcimporter"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/gcimporter"
"golang.org/x/tools/go/types"
)
var fset = token.NewFileSet()

Просмотреть файл

@ -4,7 +4,7 @@
package importer
import "code.google.com/p/go.tools/go/types"
import "golang.org/x/tools/go/types"
const (
magic = "\n$$ exports $$\n"

Просмотреть файл

@ -136,9 +136,9 @@ import (
"os"
"strings"
"code.google.com/p/go.tools/astutil"
"code.google.com/p/go.tools/go/gcimporter"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/astutil"
"golang.org/x/tools/go/gcimporter"
"golang.org/x/tools/go/types"
)
// Config specifies the configuration for a program to load.

Просмотреть файл

@ -16,7 +16,7 @@ import (
"testing"
"time"
"code.google.com/p/go.tools/go/loader"
"golang.org/x/tools/go/loader"
)
func loadFromArgs(args []string) (prog *loader.Program, rest []string, err error) {

Просмотреть файл

@ -13,9 +13,9 @@ import (
"strings"
"testing"
"code.google.com/p/go.tools/astutil"
"code.google.com/p/go.tools/go/loader"
"code.google.com/p/go.tools/go/ssa"
"golang.org/x/tools/astutil"
"golang.org/x/tools/go/loader"
"golang.org/x/tools/go/ssa"
)
// findInterval parses input and returns the [start, end) positions of

Просмотреть файл

@ -23,9 +23,9 @@ import (
"testing"
"time"
"code.google.com/p/go.tools/go/buildutil"
"code.google.com/p/go.tools/go/loader"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/buildutil"
"golang.org/x/tools/go/loader"
"golang.org/x/tools/go/types"
)
func TestStdlib(t *testing.T) {

Просмотреть файл

@ -16,10 +16,10 @@ import (
"runtime/debug"
"sort"
"code.google.com/p/go.tools/go/callgraph"
"code.google.com/p/go.tools/go/ssa"
"code.google.com/p/go.tools/go/types"
"code.google.com/p/go.tools/go/types/typeutil"
"golang.org/x/tools/go/callgraph"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/types"
"golang.org/x/tools/go/types/typeutil"
)
const (

Просмотреть файл

@ -10,10 +10,10 @@ import (
"go/token"
"io"
"code.google.com/p/go.tools/container/intsets"
"code.google.com/p/go.tools/go/callgraph"
"code.google.com/p/go.tools/go/ssa"
"code.google.com/p/go.tools/go/types/typeutil"
"golang.org/x/tools/container/intsets"
"golang.org/x/tools/go/callgraph"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/types/typeutil"
)
// A Config formulates a pointer analysis problem for Analyze().

Просмотреть файл

@ -10,7 +10,7 @@ import (
"fmt"
"go/token"
"code.google.com/p/go.tools/go/ssa"
"golang.org/x/tools/go/ssa"
)
type cgnode struct {

Просмотреть файл

@ -5,7 +5,7 @@
package pointer
import (
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
type constraint interface {

Просмотреть файл

@ -8,10 +8,10 @@ import (
"fmt"
"sort"
"code.google.com/p/go.tools/go/callgraph"
"code.google.com/p/go.tools/go/loader"
"code.google.com/p/go.tools/go/pointer"
"code.google.com/p/go.tools/go/ssa"
"golang.org/x/tools/go/callgraph"
"golang.org/x/tools/go/loader"
"golang.org/x/tools/go/pointer"
"golang.org/x/tools/go/ssa"
)
// This program demonstrates how to use the pointer analysis to

Просмотреть файл

@ -14,9 +14,9 @@ import (
"fmt"
"go/token"
"code.google.com/p/go.tools/go/callgraph"
"code.google.com/p/go.tools/go/ssa"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/callgraph"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/types"
)
var (

Просмотреть файл

@ -162,8 +162,8 @@ import (
"io"
"reflect"
"code.google.com/p/go.tools/container/intsets"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/container/intsets"
"golang.org/x/tools/go/types"
)
// A peLabel is a pointer-equivalence label: two nodes with the same

Просмотреть файл

@ -18,8 +18,8 @@ package pointer
import (
"fmt"
"code.google.com/p/go.tools/go/ssa"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/types"
)
// Instances of 'intrinsic' generate analysis constraints for calls to

Просмотреть файл

@ -9,8 +9,8 @@ import (
"go/token"
"strings"
"code.google.com/p/go.tools/go/ssa"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/types"
)
// A Label is an entity that may be pointed to by a pointer, map,

Просмотреть файл

@ -21,13 +21,13 @@ import (
"strings"
"testing"
"code.google.com/p/go.tools/go/callgraph"
"code.google.com/p/go.tools/go/loader"
"code.google.com/p/go.tools/go/pointer"
"code.google.com/p/go.tools/go/ssa"
"code.google.com/p/go.tools/go/ssa/ssautil"
"code.google.com/p/go.tools/go/types"
"code.google.com/p/go.tools/go/types/typeutil"
"golang.org/x/tools/go/callgraph"
"golang.org/x/tools/go/loader"
"golang.org/x/tools/go/pointer"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/ssa/ssautil"
"golang.org/x/tools/go/types"
"golang.org/x/tools/go/types/typeutil"
)
var inputs = []string{

Просмотреть файл

@ -28,9 +28,9 @@ import (
"fmt"
"reflect"
"code.google.com/p/go.tools/go/exact"
"code.google.com/p/go.tools/go/ssa"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/exact"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/types"
)
func init() {

Просмотреть файл

@ -10,7 +10,7 @@ package pointer
import (
"fmt"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
type solverState struct {

Просмотреть файл

@ -10,7 +10,7 @@ package pointer
//
// Because it is relatively slow, the --stdlib flag must be enabled for
// this test to run:
// % go test -v code.google.com/p/go.tools/go/pointer --stdlib
// % go test -v golang.org/x/tools/go/pointer --stdlib
import (
"flag"
@ -19,10 +19,10 @@ import (
"testing"
"time"
"code.google.com/p/go.tools/go/buildutil"
"code.google.com/p/go.tools/go/loader"
"code.google.com/p/go.tools/go/ssa"
"code.google.com/p/go.tools/go/ssa/ssautil"
"golang.org/x/tools/go/buildutil"
"golang.org/x/tools/go/loader"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/ssa/ssautil"
)
var runStdlibTest = flag.Bool("stdlib", false, "Run the (slow) stdlib test")

Просмотреть файл

@ -13,8 +13,8 @@ import (
"runtime"
"time"
"code.google.com/p/go.tools/container/intsets"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/container/intsets"
"golang.org/x/tools/go/types"
)
// CanPoint reports whether the type T is pointerlike,

Просмотреть файл

@ -37,8 +37,8 @@ import (
"sync"
"sync/atomic"
"code.google.com/p/go.tools/go/exact"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/exact"
"golang.org/x/tools/go/types"
)
type opaqueType struct {

Просмотреть файл

@ -11,9 +11,9 @@ import (
"strings"
"testing"
"code.google.com/p/go.tools/go/loader"
"code.google.com/p/go.tools/go/ssa"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/loader"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/types"
)
func isEmpty(f *ssa.Function) bool { return f.Blocks == nil }

Просмотреть файл

@ -11,8 +11,8 @@ import (
"go/token"
"strconv"
"code.google.com/p/go.tools/go/exact"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/exact"
"golang.org/x/tools/go/types"
)
// NewConst returns a new constant of the specified value and type.

Просмотреть файл

@ -13,8 +13,8 @@ import (
"os"
"sync"
"code.google.com/p/go.tools/go/loader"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/loader"
"golang.org/x/tools/go/types"
)
// BuilderMode is a bitmask of options for diagnostics and checking.

Просмотреть файл

@ -11,7 +11,7 @@ import (
"go/ast"
"go/token"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
// emitNew emits to f a new (heap Alloc) instruction allocating an

Просмотреть файл

@ -8,8 +8,8 @@ import (
"fmt"
"os"
"code.google.com/p/go.tools/go/loader"
"code.google.com/p/go.tools/go/ssa"
"golang.org/x/tools/go/loader"
"golang.org/x/tools/go/ssa"
)
// This program demonstrates how to run the SSA builder on a "Hello,
@ -26,7 +26,7 @@ import (
//
// Build and run the ssadump.go program if you want a standalone tool
// with similar functionality. It is located at
// code.google.com/p/go.tools/cmd/ssadump.
// golang.org/x/tools/cmd/ssadump.
//
func Example() {
const hello = `

Просмотреть файл

@ -15,7 +15,7 @@ import (
"os"
"strings"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/types"
)
// addEdge adds a control-flow graph edge from from to to.

Просмотреть файл

@ -15,8 +15,8 @@ import (
"time"
"unsafe"
"code.google.com/p/go.tools/go/ssa"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/types"
)
type externalFn func(fr *frame, args []value) value

Просмотреть файл

@ -51,8 +51,8 @@ import (
"reflect"
"runtime"
"code.google.com/p/go.tools/go/ssa"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/types"
)
type continuation int

Просмотреть файл

@ -16,10 +16,10 @@ import (
"testing"
"time"
"code.google.com/p/go.tools/go/loader"
"code.google.com/p/go.tools/go/ssa"
"code.google.com/p/go.tools/go/ssa/interp"
"code.google.com/p/go.tools/go/types"
"golang.org/x/tools/go/loader"
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/ssa/interp"
"golang.org/x/tools/go/types"
)
// Each line contains a space-separated list of $GOROOT/test/
@ -208,7 +208,7 @@ func run(t *testing.T, dir, input string, success successPredicate) bool {
interp.CapturedOutput = nil
}()
hint = fmt.Sprintf("To dump SSA representation, run:\n%% go build code.google.com/p/go.tools/cmd/ssadump && ./ssadump -build=CFP %s\n", input)
hint = fmt.Sprintf("To dump SSA representation, run:\n%% go build golang.org/x/tools/cmd/ssadump && ./ssadump -build=CFP %s\n", input)
iprog, err := conf.Load()
if err != nil {
@ -247,7 +247,7 @@ func run(t *testing.T, dir, input string, success successPredicate) bool {
var out bytes.Buffer
interp.CapturedOutput = &out
hint = fmt.Sprintf("To trace execution, run:\n%% go build code.google.com/p/go.tools/cmd/ssadump && ./ssadump -build=C -run --interp=T %s\n", input)
hint = fmt.Sprintf("To trace execution, run:\n%% go build golang.org/x/tools/cmd/ssadump && ./ssadump -build=C -run --interp=T %s\n", input)
exitCode := interp.Interpret(mainPkg, 0, &types.StdSizes{8, 8}, inputs[0], []string{})
// The definition of success varies with each file.

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше