summaryrefslogtreecommitdiff
path: root/test/garbage/parser.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/garbage/parser.go')
-rw-r--r--test/garbage/parser.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/garbage/parser.go b/test/garbage/parser.go
index e8e049474..cf68737fb 100644
--- a/test/garbage/parser.go
+++ b/test/garbage/parser.go
@@ -30,11 +30,11 @@ func isPkgFile(dir *os.FileInfo) bool {
}
func pkgName(filename string) string {
- file, err := parser.ParseFile(filename, nil, nil, parser.PackageClauseOnly)
+ file, err := parser.ParseFile(filename, nil, parser.PackageClauseOnly)
if err != nil || file == nil {
return ""
}
- return file.Name.Name()
+ return file.Name.Name
}
func parseDir(dirpath string) map[string]*ast.Package {
@@ -74,7 +74,7 @@ func main() {
flag.Parse()
var t0 int64
- pkgroot := os.Getenv("GOROOT") + "/src/pkg/"
+ pkgroot := runtime.GOROOT() + "/src/pkg/"
for pass := 0; pass < 2; pass++ {
// Once the heap is grown to full size, reset counters.
// This hides the start-up pauses, which are much smaller
@@ -115,7 +115,6 @@ var packages = []string{
"archive/tar",
"asn1",
"big",
- "bignum",
"bufio",
"bytes",
"cmath",
@@ -185,7 +184,6 @@ var packages = []string{
"mime",
"net",
"nntp",
- "once",
"os",
"os/signal",
"patch",