зеркало из https://github.com/golang/tools.git
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:
Родитель
3191bbae17
Коммит
5ebbcd132f
|
@ -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.
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче