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:
parent
3191bbae17
commit
5ebbcd132f
|
@ -18,7 +18,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/astutil"
|
"golang.org/x/tools/astutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// pathToString returns a string containing the concrete types of the
|
// pathToString returns a string containing the concrete types of the
|
||||||
|
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/blog/atom"
|
"golang.org/x/tools/blog/atom"
|
||||||
"code.google.com/p/go.tools/present"
|
"golang.org/x/tools/present"
|
||||||
)
|
)
|
||||||
|
|
||||||
var validJSONPFunc = regexp.MustCompile(`(?i)^[a-z_][a-z0-9_.]*$`)
|
var validJSONPFunc = regexp.MustCompile(`(?i)^[a-z_][a-z0-9_.]*$`)
|
||||||
|
|
|
@ -17,7 +17,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"text/tabwriter"
|
"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
|
// funcOutput takes two file names as arguments, a coverage profile to read as input and an output
|
||||||
|
|
|
@ -17,7 +17,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/cover"
|
"golang.org/x/tools/cover"
|
||||||
)
|
)
|
||||||
|
|
||||||
// htmlOutput reads the profile data from profile and generates an HTML
|
// 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:
|
Show the transitive closure of imports of the digraph tool itself:
|
||||||
% go list -f '{{.ImportPath}}{{.Imports}}' ... | tr '[]' ' ' |
|
% 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:
|
Show which clothes (see above) must be donned before a jacket:
|
||||||
% digraph reverse jacket <clothes.txt
|
% digraph reverse jacket <clothes.txt
|
||||||
|
|
|
@ -12,8 +12,8 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/loader"
|
"golang.org/x/tools/go/loader"
|
||||||
"code.google.com/p/go.tools/refactor/eg"
|
"golang.org/x/tools/refactor/eg"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
//
|
//
|
||||||
// godex automatically tries all possible package path prefixes if only a
|
// godex automatically tries all possible package path prefixes if only a
|
||||||
// partial package path is given. For instance, for the path "go/types",
|
// 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 prefixes are computed by searching the directories specified by
|
||||||
// the GOROOT and GOPATH environment variables (and by excluding the
|
// the GOROOT and GOPATH environment variables (and by excluding the
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.google.com/p/go.tools/go/gcimporter"
|
"golang.org/x/tools/go/gcimporter"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.google.com/p/go.tools/go/gccgoimporter"
|
"golang.org/x/tools/go/gccgoimporter"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -11,8 +11,8 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/exact"
|
"golang.org/x/tools/go/exact"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO(gri) use tabwriter for alignment?
|
// TODO(gri) use tabwriter for alignment?
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
package main
|
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) {
|
func (p *printer) writeType(this *types.Package, typ types.Type) {
|
||||||
p.writeTypeInternal(this, typ, make([]types.Type, 8))
|
p.writeTypeInternal(this, typ, make([]types.Type, 8))
|
||||||
|
|
|
@ -10,7 +10,7 @@ Prerequisites
|
||||||
* Go sources at tip under $GOROOT
|
* Go sources at tip under $GOROOT
|
||||||
|
|
||||||
* Godoc sources at tip inside $GOPATH
|
* 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
|
Directory structure
|
||||||
|
@ -23,7 +23,7 @@ Directory structure
|
||||||
app-engine release and version of godoc):
|
app-engine release and version of godoc):
|
||||||
|
|
||||||
app.yaml
|
app.yaml
|
||||||
code.google.com/p/go.tools/cmd/godoc
|
golang.org/x/tools/cmd/godoc
|
||||||
godoc.zip
|
godoc.zip
|
||||||
index.split.*
|
index.split.*
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,11 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/godoc"
|
"golang.org/x/tools/godoc"
|
||||||
"code.google.com/p/go.tools/godoc/static"
|
"golang.org/x/tools/godoc/static"
|
||||||
"code.google.com/p/go.tools/godoc/vfs"
|
"golang.org/x/tools/godoc/vfs"
|
||||||
"code.google.com/p/go.tools/godoc/vfs/mapfs"
|
"golang.org/x/tools/godoc/vfs/mapfs"
|
||||||
"code.google.com/p/go.tools/godoc/vfs/zipfs"
|
"golang.org/x/tools/godoc/vfs/zipfs"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -15,12 +15,12 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/blog"
|
"golang.org/x/tools/blog"
|
||||||
"code.google.com/p/go.tools/godoc/redirect"
|
"golang.org/x/tools/godoc/redirect"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
blogRepo = "code.google.com/p/go.blog"
|
blogRepo = "golang.org/x/blog"
|
||||||
blogURL = "http://blog.golang.org/"
|
blogURL = "http://blog.golang.org/"
|
||||||
blogPath = "/blog/"
|
blogPath = "/blog/"
|
||||||
)
|
)
|
||||||
|
|
|
@ -29,8 +29,8 @@ import (
|
||||||
"text/template"
|
"text/template"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/godoc"
|
"golang.org/x/tools/godoc"
|
||||||
"code.google.com/p/go.tools/godoc/vfs"
|
"golang.org/x/tools/godoc/vfs"
|
||||||
)
|
)
|
||||||
|
|
||||||
var codewalkHTML, codewalkdirHTML *template.Template
|
var codewalkHTML, codewalkdirHTML *template.Template
|
||||||
|
|
|
@ -17,9 +17,9 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/godoc"
|
"golang.org/x/tools/godoc"
|
||||||
"code.google.com/p/go.tools/godoc/redirect"
|
"golang.org/x/tools/godoc/redirect"
|
||||||
"code.google.com/p/go.tools/godoc/vfs"
|
"golang.org/x/tools/godoc/vfs"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -44,18 +44,18 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/godoc"
|
"golang.org/x/tools/godoc"
|
||||||
"code.google.com/p/go.tools/godoc/analysis"
|
"golang.org/x/tools/godoc/analysis"
|
||||||
"code.google.com/p/go.tools/godoc/static"
|
"golang.org/x/tools/godoc/static"
|
||||||
"code.google.com/p/go.tools/godoc/vfs"
|
"golang.org/x/tools/godoc/vfs"
|
||||||
"code.google.com/p/go.tools/godoc/vfs/gatefs"
|
"golang.org/x/tools/godoc/vfs/gatefs"
|
||||||
"code.google.com/p/go.tools/godoc/vfs/mapfs"
|
"golang.org/x/tools/godoc/vfs/mapfs"
|
||||||
"code.google.com/p/go.tools/godoc/vfs/zipfs"
|
"golang.org/x/tools/godoc/vfs/zipfs"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defaultAddr = ":6060" // default webserver address
|
defaultAddr = ":6060" // default webserver address
|
||||||
toolsPath = "code.google.com/p/go.tools/cmd/"
|
toolsPath = "golang.org/x/tools/cmd/"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
|
|
||||||
// This package registers "/compile" and "/share" handlers
|
// This package registers "/compile" and "/share" handlers
|
||||||
// that redirect to the golang.org playground.
|
// that redirect to the golang.org playground.
|
||||||
_ "code.google.com/p/go.tools/playground"
|
_ "golang.org/x/tools/playground"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
ZIPFILE=godoc.zip
|
ZIPFILE=godoc.zip
|
||||||
INDEXFILE=godoc.index
|
INDEXFILE=godoc.index
|
||||||
SPLITFILES=index.split.
|
SPLITFILES=index.split.
|
||||||
GODOC=code.google.com/p/go.tools/cmd/godoc
|
GODOC=golang.org/x/tools/cmd/godoc
|
||||||
CONFIGFILE=$GODOC/appconfig.go
|
CONFIGFILE=$GODOC/appconfig.go
|
||||||
|
|
||||||
error() {
|
error() {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
Command goimports updates your Go import lines,
|
Command goimports updates your Go import lines,
|
||||||
adding missing ones and removing unreferenced ones.
|
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's a drop-in replacement for your editor's gofmt-on-save hook.
|
||||||
It has the same command-line interface as gofmt and formats
|
It has the same command-line interface as gofmt and formats
|
||||||
|
|
|
@ -17,7 +17,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/imports"
|
"golang.org/x/tools/imports"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/refactor/rename"
|
"golang.org/x/tools/refactor/rename"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -18,9 +18,9 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/gccgoimporter"
|
"golang.org/x/tools/go/gccgoimporter"
|
||||||
_ "code.google.com/p/go.tools/go/gcimporter"
|
_ "golang.org/x/tools/go/gcimporter"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// This program takes an HTML file and outputs a corresponding article file in
|
// 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
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -19,8 +19,8 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.net/html"
|
"golang.org/x/net/html"
|
||||||
"code.google.com/p/go.net/html/atom"
|
"golang.org/x/net/html/atom"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
@ -21,7 +21,7 @@ function die() {
|
||||||
trap "rm -f $log" EXIT
|
trap "rm -f $log" EXIT
|
||||||
|
|
||||||
# Build and install oracle.
|
# 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/
|
mv -f $GOPATH/bin/oracle $GOROOT/bin/
|
||||||
$GOROOT/bin/oracle >$log 2>&1 || true # (prints usage and exits 1)
|
$GOROOT/bin/oracle >$log 2>&1 || true # (prints usage and exits 1)
|
||||||
grep -q "Run.*help" $log || die "$GOROOT/bin/oracle not installed"
|
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 \
|
--load $thisdir/oracle.el \
|
||||||
--eval '
|
--eval '
|
||||||
(progn
|
(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")
|
(find-file "'$thisdir'/main.go")
|
||||||
(search-forward "\"fmt\"")
|
(search-forward "\"fmt\"")
|
||||||
(backward-char)
|
(backward-char)
|
||||||
|
|
|
@ -23,8 +23,8 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/loader"
|
"golang.org/x/tools/go/loader"
|
||||||
"code.google.com/p/go.tools/oracle"
|
"golang.org/x/tools/oracle"
|
||||||
)
|
)
|
||||||
|
|
||||||
var posFlag = flag.String("pos", "",
|
var posFlag = flag.String("pos", "",
|
||||||
|
@ -69,8 +69,8 @@ The user manual is available here: http://golang.org/s/oracle-user-manual
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
Describe the syntax at offset 530 in this file (an import spec):
|
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 \
|
% oracle -pos=src/golang.org/x/tools/cmd/oracle/main.go:#530 describe \
|
||||||
code.google.com/p/go.tools/cmd/oracle
|
golang.org/x/tools/cmd/oracle
|
||||||
|
|
||||||
Print the callgraph of the trivial web-server in JSON format:
|
Print the callgraph of the trivial web-server in JSON format:
|
||||||
% oracle -format=json $GOROOT/src/net/http/triv.go callgraph
|
% oracle -format=json $GOROOT/src/net/http/triv.go callgraph
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
;;;
|
;;;
|
||||||
;;; To install the Go oracle, run:
|
;;; To install the Go oracle, run:
|
||||||
;;; % export GOROOT=... GOPATH=...
|
;;; % 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/
|
;;; % mv $GOPATH/bin/oracle $GOROOT/bin/
|
||||||
;;;
|
;;;
|
||||||
;;; Load this file into Emacs and set go-oracle-scope to your
|
;;; Load this file into Emacs and set go-oracle-scope to your
|
||||||
|
|
|
@ -9,9 +9,9 @@ package main
|
||||||
import (
|
import (
|
||||||
"mime"
|
"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/"
|
var basePath = "./present/"
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/present"
|
"golang.org/x/tools/present"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
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.
|
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
|
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:
|
Usage of present:
|
||||||
-base="": base path for slide template and static resources
|
-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
|
.article // article format, such as a blog post
|
||||||
|
|
||||||
The present file format is documented by the present package:
|
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
|
package main
|
||||||
|
|
|
@ -18,11 +18,11 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/playground/socket"
|
"golang.org/x/tools/playground/socket"
|
||||||
"code.google.com/p/go.tools/present"
|
"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
|
var basePath string
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"time"
|
"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"}
|
var scripts = []string{"jquery.js", "jquery-ui.js", "playground.js", "play.js"}
|
||||||
|
|
|
@ -13,10 +13,10 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/loader"
|
"golang.org/x/tools/go/loader"
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
"code.google.com/p/go.tools/go/ssa/interp"
|
"golang.org/x/tools/go/ssa/interp"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var buildFlag = flag.String("build", "", `Options controlling the SSA builder.
|
var buildFlag = flag.String("build", "", `Options controlling the SSA builder.
|
||||||
|
|
|
@ -74,10 +74,10 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/exact"
|
"golang.org/x/tools/go/exact"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
|
|
||||||
_ "code.google.com/p/go.tools/go/gcimporter"
|
_ "golang.org/x/tools/go/gcimporter"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
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 [directory]\n")
|
||||||
fmt.Fprintf(os.Stderr, "\tstringer [flags[ -type T files... # Must be a single package\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, "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")
|
fmt.Fprintf(os.Stderr, "Flags:\n")
|
||||||
flag.PrintDefaults()
|
flag.PrintDefaults()
|
||||||
os.Exit(2)
|
os.Exit(2)
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"go/ast"
|
"go/ast"
|
||||||
"strings"
|
"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")
|
var compositeWhiteList = flag.Bool("compositewhitelist", true, "use composite white list; for testing only")
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"go/ast"
|
"go/ast"
|
||||||
"go/token"
|
"go/token"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -21,8 +21,8 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
_ "code.google.com/p/go.tools/go/gcimporter"
|
_ "golang.org/x/tools/go/gcimporter"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: Need a flag to set build tags when parsing the package.
|
// 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] directory...\n")
|
||||||
fmt.Fprintf(os.Stderr, "\tvet [flags] files... # Must be a single package\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, "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")
|
fmt.Fprintf(os.Stderr, "Flags:\n")
|
||||||
flag.PrintDefaults()
|
flag.PrintDefaults()
|
||||||
os.Exit(2)
|
os.Exit(2)
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"go/ast"
|
"go/ast"
|
||||||
"go/token"
|
"go/token"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -15,8 +15,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/exact"
|
"golang.org/x/tools/go/exact"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var printfuncs = flag.String("printfuncs", "", "comma-separated list of print function names to check")
|
var printfuncs = flag.String("printfuncs", "", "comma-separated list of print function names to check")
|
||||||
|
|
|
@ -35,7 +35,7 @@ import (
|
||||||
"go/ast"
|
"go/ast"
|
||||||
"go/token"
|
"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")
|
var strictShadowing = flag.Bool("shadowstrict", false, "whether to be strict about shadowing; can be noisy")
|
||||||
|
|
|
@ -12,8 +12,8 @@ import (
|
||||||
"go/ast"
|
"go/ast"
|
||||||
"go/token"
|
"go/token"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/exact"
|
"golang.org/x/tools/go/exact"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"go/ast"
|
"go/ast"
|
||||||
"go/token"
|
"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.
|
// imports is the canonical map of imported packages we need for typechecking.
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"go/ast"
|
"go/ast"
|
||||||
"go/token"
|
"go/token"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/container/intsets"
|
"golang.org/x/tools/container/intsets"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBasics(t *testing.T) {
|
func TestBasics(t *testing.T) {
|
||||||
|
|
|
@ -61,47 +61,47 @@ var goPackages = []*Package{
|
||||||
{
|
{
|
||||||
Kind: "subrepo",
|
Kind: "subrepo",
|
||||||
Name: "go.blog",
|
Name: "go.blog",
|
||||||
Path: "code.google.com/p/go.blog",
|
Path: "golang.org/x/blog",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Kind: "subrepo",
|
Kind: "subrepo",
|
||||||
Name: "go.codereview",
|
Name: "go.codereview",
|
||||||
Path: "code.google.com/p/go.codereview",
|
Path: "golang.org/x/codereview",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Kind: "subrepo",
|
Kind: "subrepo",
|
||||||
Name: "go.crypto",
|
Name: "go.crypto",
|
||||||
Path: "code.google.com/p/go.crypto",
|
Path: "golang.org/x/crypto",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Kind: "subrepo",
|
Kind: "subrepo",
|
||||||
Name: "go.exp",
|
Name: "go.exp",
|
||||||
Path: "code.google.com/p/go.exp",
|
Path: "golang.org/x/exp",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Kind: "subrepo",
|
Kind: "subrepo",
|
||||||
Name: "go.image",
|
Name: "go.image",
|
||||||
Path: "code.google.com/p/go.image",
|
Path: "golang.org/x/image",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Kind: "subrepo",
|
Kind: "subrepo",
|
||||||
Name: "go.net",
|
Name: "go.net",
|
||||||
Path: "code.google.com/p/go.net",
|
Path: "golang.org/x/net",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Kind: "subrepo",
|
Kind: "subrepo",
|
||||||
Name: "go.sys",
|
Name: "go.sys",
|
||||||
Path: "code.google.com/p/go.sys",
|
Path: "golang.org/x/sys",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Kind: "subrepo",
|
Kind: "subrepo",
|
||||||
Name: "go.talks",
|
Name: "go.talks",
|
||||||
Path: "code.google.com/p/go.talks",
|
Path: "golang.org/x/talks",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Kind: "subrepo",
|
Kind: "subrepo",
|
||||||
Name: "go.tools",
|
Name: "go.tools",
|
||||||
Path: "code.google.com/p/go.tools",
|
Path: "golang.org/x/tools",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ var testEntityKinds = []string{
|
||||||
"Log",
|
"Log",
|
||||||
}
|
}
|
||||||
|
|
||||||
const testPkg = "code.google.com/p/go.test"
|
const testPkg = "golang.org/x/test"
|
||||||
|
|
||||||
var testPackage = &Package{Name: "Test", Kind: "subrepo", Path: testPkg}
|
var testPackage = &Package{Name: "Test", Kind: "subrepo", Path: testPkg}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"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.
|
// builderEnv represents the environment that a Builder will run tests in.
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/vcs"
|
"golang.org/x/tools/go/vcs"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -55,7 +55,7 @@ var (
|
||||||
buildTool = flag.String("tool", "go", "Tool to build.")
|
buildTool = flag.String("tool", "go", "Tool to build.")
|
||||||
gcPath = flag.String("gcpath", "code.google.com/p/go", "Path to download gc from")
|
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")
|
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")
|
failAll = flag.Bool("fail", false, "fail all builds")
|
||||||
parallel = flag.Bool("parallel", false, "Build multiple targets in parallel")
|
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")
|
buildTimeout = flag.Duration("buildTimeout", 60*time.Minute, "Maximum time to wait for builds and tests")
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/vcs"
|
"golang.org/x/tools/go/vcs"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Repo represents a mercurial repository.
|
// 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
|
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)
|
(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
|
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
|
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
|
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
|
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
|
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)
|
(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
|
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
|
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
|
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
|
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
|
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)
|
(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
|
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
|
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
|
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
|
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
|
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)
|
(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
|
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
|
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
|
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
|
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
|
// subrepoList fetches a list of sub-repositories from the dashboard
|
||||||
// and returns them as a slice of base import paths.
|
// 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) {
|
func subrepoList() ([]string, error) {
|
||||||
r, err := http.Get(*dashboard + "packages?kind=subrepo")
|
r, err := http.Get(*dashboard + "packages?kind=subrepo")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"go/build"
|
"go/build"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/buildutil"
|
"golang.org/x/tools/go/buildutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAllPackages(t *testing.T) {
|
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)
|
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] {
|
if !set[want] {
|
||||||
t.Errorf("Package %q not found; got %s", want, all)
|
t.Errorf("Package %q not found; got %s", want, all)
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/buildutil"
|
"golang.org/x/tools/go/buildutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestContainingPackage(t *testing.T) {
|
func TestContainingPackage(t *testing.T) {
|
||||||
|
@ -23,8 +23,8 @@ func TestContainingPackage(t *testing.T) {
|
||||||
{goroot + "/src/fmt/print.go", "fmt"},
|
{goroot + "/src/fmt/print.go", "fmt"},
|
||||||
{goroot + "/src/encoding/json/foo.go", "encoding/json"},
|
{goroot + "/src/encoding/json/foo.go", "encoding/json"},
|
||||||
{goroot + "/src/encoding/missing/foo.go", "(not found)"},
|
{goroot + "/src/encoding/missing/foo.go", "(not found)"},
|
||||||
{gopath + "/src/code.google.com/p/go.tools/go/buildutil/util_test.go",
|
{gopath + "/src/golang.org/x/tools/go/buildutil/util_test.go",
|
||||||
"code.google.com/p/go.tools/go/buildutil"},
|
"golang.org/x/tools/go/buildutil"},
|
||||||
} {
|
} {
|
||||||
file, want := test[0], test[1]
|
file, want := test[0], test[1]
|
||||||
bp, err := buildutil.ContainingPackage(&build.Default, ".", file)
|
bp, err := buildutil.ContainingPackage(&build.Default, ".", file)
|
||||||
|
|
|
@ -43,7 +43,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"go/token"
|
"go/token"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A Graph represents a call graph.
|
// A Graph represents a call graph.
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
package callgraph
|
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
|
// This file provides various utilities over call graphs, such as
|
||||||
// visitation and path search.
|
// visitation and path search.
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Information about a specific installation of gccgo.
|
// Information about a specific installation of gccgo.
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var importablePackages = [...]string{
|
var importablePackages = [...]string{
|
||||||
|
|
|
@ -16,8 +16,8 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/importer"
|
"golang.org/x/tools/go/importer"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A PackageInit describes an imported package that needs initialization.
|
// A PackageInit describes an imported package that needs initialization.
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type importerTest struct {
|
type importerTest struct {
|
||||||
|
|
|
@ -14,8 +14,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"text/scanner"
|
"text/scanner"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/exact"
|
"golang.org/x/tools/go/exact"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type parser struct {
|
type parser struct {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"text/scanner"
|
"text/scanner"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var typeParserTests = []struct {
|
var typeParserTests = []struct {
|
||||||
|
|
|
@ -19,8 +19,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"text/scanner"
|
"text/scanner"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/exact"
|
"golang.org/x/tools/go/exact"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// debugging/development support
|
// debugging/development support
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var gcPath string // Go compiler path
|
var gcPath string // Go compiler path
|
||||||
|
|
|
@ -11,8 +11,8 @@ import (
|
||||||
"go/ast"
|
"go/ast"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/exact"
|
"golang.org/x/tools/go/exact"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// debugging support
|
// debugging support
|
||||||
|
|
|
@ -14,8 +14,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"go/token"
|
"go/token"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/exact"
|
"golang.org/x/tools/go/exact"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ImportData imports a package from the serialized package data
|
// ImportData imports a package from the serialized package data
|
||||||
|
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/gcimporter"
|
"golang.org/x/tools/go/gcimporter"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var fset = token.NewFileSet()
|
var fset = token.NewFileSet()
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
package importer
|
package importer
|
||||||
|
|
||||||
import "code.google.com/p/go.tools/go/types"
|
import "golang.org/x/tools/go/types"
|
||||||
|
|
||||||
const (
|
const (
|
||||||
magic = "\n$$ exports $$\n"
|
magic = "\n$$ exports $$\n"
|
||||||
|
|
|
@ -136,9 +136,9 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/astutil"
|
"golang.org/x/tools/astutil"
|
||||||
"code.google.com/p/go.tools/go/gcimporter"
|
"golang.org/x/tools/go/gcimporter"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config specifies the configuration for a program to load.
|
// Config specifies the configuration for a program to load.
|
||||||
|
|
|
@ -16,7 +16,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"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) {
|
func loadFromArgs(args []string) (prog *loader.Program, rest []string, err error) {
|
||||||
|
|
|
@ -13,9 +13,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/astutil"
|
"golang.org/x/tools/astutil"
|
||||||
"code.google.com/p/go.tools/go/loader"
|
"golang.org/x/tools/go/loader"
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
)
|
)
|
||||||
|
|
||||||
// findInterval parses input and returns the [start, end) positions of
|
// findInterval parses input and returns the [start, end) positions of
|
||||||
|
|
|
@ -23,9 +23,9 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/buildutil"
|
"golang.org/x/tools/go/buildutil"
|
||||||
"code.google.com/p/go.tools/go/loader"
|
"golang.org/x/tools/go/loader"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStdlib(t *testing.T) {
|
func TestStdlib(t *testing.T) {
|
||||||
|
|
|
@ -16,10 +16,10 @@ import (
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/callgraph"
|
"golang.org/x/tools/go/callgraph"
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
"code.google.com/p/go.tools/go/types/typeutil"
|
"golang.org/x/tools/go/types/typeutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -10,10 +10,10 @@ import (
|
||||||
"go/token"
|
"go/token"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/container/intsets"
|
"golang.org/x/tools/container/intsets"
|
||||||
"code.google.com/p/go.tools/go/callgraph"
|
"golang.org/x/tools/go/callgraph"
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
"code.google.com/p/go.tools/go/types/typeutil"
|
"golang.org/x/tools/go/types/typeutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A Config formulates a pointer analysis problem for Analyze().
|
// A Config formulates a pointer analysis problem for Analyze().
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"go/token"
|
"go/token"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
)
|
)
|
||||||
|
|
||||||
type cgnode struct {
|
type cgnode struct {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
package pointer
|
package pointer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type constraint interface {
|
type constraint interface {
|
||||||
|
|
|
@ -8,10 +8,10 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/callgraph"
|
"golang.org/x/tools/go/callgraph"
|
||||||
"code.google.com/p/go.tools/go/loader"
|
"golang.org/x/tools/go/loader"
|
||||||
"code.google.com/p/go.tools/go/pointer"
|
"golang.org/x/tools/go/pointer"
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
)
|
)
|
||||||
|
|
||||||
// This program demonstrates how to use the pointer analysis to
|
// This program demonstrates how to use the pointer analysis to
|
||||||
|
|
|
@ -14,9 +14,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"go/token"
|
"go/token"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/callgraph"
|
"golang.org/x/tools/go/callgraph"
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -162,8 +162,8 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/container/intsets"
|
"golang.org/x/tools/container/intsets"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A peLabel is a pointer-equivalence label: two nodes with the same
|
// A peLabel is a pointer-equivalence label: two nodes with the same
|
||||||
|
|
|
@ -18,8 +18,8 @@ package pointer
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Instances of 'intrinsic' generate analysis constraints for calls to
|
// Instances of 'intrinsic' generate analysis constraints for calls to
|
||||||
|
|
|
@ -9,8 +9,8 @@ import (
|
||||||
"go/token"
|
"go/token"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A Label is an entity that may be pointed to by a pointer, map,
|
// A Label is an entity that may be pointed to by a pointer, map,
|
||||||
|
|
|
@ -21,13 +21,13 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/callgraph"
|
"golang.org/x/tools/go/callgraph"
|
||||||
"code.google.com/p/go.tools/go/loader"
|
"golang.org/x/tools/go/loader"
|
||||||
"code.google.com/p/go.tools/go/pointer"
|
"golang.org/x/tools/go/pointer"
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
"code.google.com/p/go.tools/go/ssa/ssautil"
|
"golang.org/x/tools/go/ssa/ssautil"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
"code.google.com/p/go.tools/go/types/typeutil"
|
"golang.org/x/tools/go/types/typeutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
var inputs = []string{
|
var inputs = []string{
|
||||||
|
|
|
@ -28,9 +28,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/exact"
|
"golang.org/x/tools/go/exact"
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -10,7 +10,7 @@ package pointer
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type solverState struct {
|
type solverState struct {
|
||||||
|
|
|
@ -10,7 +10,7 @@ package pointer
|
||||||
//
|
//
|
||||||
// Because it is relatively slow, the --stdlib flag must be enabled for
|
// Because it is relatively slow, the --stdlib flag must be enabled for
|
||||||
// this test to run:
|
// 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 (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
|
@ -19,10 +19,10 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/buildutil"
|
"golang.org/x/tools/go/buildutil"
|
||||||
"code.google.com/p/go.tools/go/loader"
|
"golang.org/x/tools/go/loader"
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
"code.google.com/p/go.tools/go/ssa/ssautil"
|
"golang.org/x/tools/go/ssa/ssautil"
|
||||||
)
|
)
|
||||||
|
|
||||||
var runStdlibTest = flag.Bool("stdlib", false, "Run the (slow) stdlib test")
|
var runStdlibTest = flag.Bool("stdlib", false, "Run the (slow) stdlib test")
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/container/intsets"
|
"golang.org/x/tools/container/intsets"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CanPoint reports whether the type T is pointerlike,
|
// CanPoint reports whether the type T is pointerlike,
|
||||||
|
|
|
@ -37,8 +37,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/exact"
|
"golang.org/x/tools/go/exact"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type opaqueType struct {
|
type opaqueType struct {
|
||||||
|
|
|
@ -11,9 +11,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/loader"
|
"golang.org/x/tools/go/loader"
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func isEmpty(f *ssa.Function) bool { return f.Blocks == nil }
|
func isEmpty(f *ssa.Function) bool { return f.Blocks == nil }
|
||||||
|
|
|
@ -11,8 +11,8 @@ import (
|
||||||
"go/token"
|
"go/token"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/exact"
|
"golang.org/x/tools/go/exact"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewConst returns a new constant of the specified value and type.
|
// NewConst returns a new constant of the specified value and type.
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/loader"
|
"golang.org/x/tools/go/loader"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BuilderMode is a bitmask of options for diagnostics and checking.
|
// BuilderMode is a bitmask of options for diagnostics and checking.
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"go/ast"
|
"go/ast"
|
||||||
"go/token"
|
"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
|
// emitNew emits to f a new (heap Alloc) instruction allocating an
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/loader"
|
"golang.org/x/tools/go/loader"
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
)
|
)
|
||||||
|
|
||||||
// This program demonstrates how to run the SSA builder on a "Hello,
|
// 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
|
// Build and run the ssadump.go program if you want a standalone tool
|
||||||
// with similar functionality. It is located at
|
// with similar functionality. It is located at
|
||||||
// code.google.com/p/go.tools/cmd/ssadump.
|
// golang.org/x/tools/cmd/ssadump.
|
||||||
//
|
//
|
||||||
func Example() {
|
func Example() {
|
||||||
const hello = `
|
const hello = `
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"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.
|
// addEdge adds a control-flow graph edge from from to to.
|
||||||
|
|
|
@ -15,8 +15,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type externalFn func(fr *frame, args []value) value
|
type externalFn func(fr *frame, args []value) value
|
||||||
|
|
|
@ -51,8 +51,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type continuation int
|
type continuation int
|
||||||
|
|
|
@ -16,10 +16,10 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.google.com/p/go.tools/go/loader"
|
"golang.org/x/tools/go/loader"
|
||||||
"code.google.com/p/go.tools/go/ssa"
|
"golang.org/x/tools/go/ssa"
|
||||||
"code.google.com/p/go.tools/go/ssa/interp"
|
"golang.org/x/tools/go/ssa/interp"
|
||||||
"code.google.com/p/go.tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Each line contains a space-separated list of $GOROOT/test/
|
// 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
|
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()
|
iprog, err := conf.Load()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -247,7 +247,7 @@ func run(t *testing.T, dir, input string, success successPredicate) bool {
|
||||||
var out bytes.Buffer
|
var out bytes.Buffer
|
||||||
interp.CapturedOutput = &out
|
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{})
|
exitCode := interp.Interpret(mainPkg, 0, &types.StdSizes{8, 8}, inputs[0], []string{})
|
||||||
|
|
||||||
// The definition of success varies with each file.
|
// The definition of success varies with each file.
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue