]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: remove 'go/build' from error messages
authorAndrew Gerrand <adg@golang.org>
Sat, 17 Dec 2011 02:14:18 +0000 (13:14 +1100)
committerAndrew Gerrand <adg@golang.org>
Sat, 17 Dec 2011 02:14:18 +0000 (13:14 +1100)
This leads to really confusing messages in goinstall.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5495074

src/pkg/go/build/path.go

index 91d6c430a9d6e398900314fdd7de6b4c4ee5c3a8..5b4d9243e67a2c87d79516731e19a174d0adeda9 100644 (file)
@@ -85,8 +85,8 @@ func (t *Tree) HasPkg(pkg string) bool {
 }
 
 var (
-       ErrNotFound     = errors.New("go/build: package could not be found locally")
-       ErrTreeNotFound = errors.New("go/build: no valid GOROOT or GOPATH could be found")
+       ErrNotFound     = errors.New("package could not be found locally")
+       ErrTreeNotFound = errors.New("no valid GOROOT or GOPATH could be found")
 )
 
 // FindTree takes an import or filesystem path and returns the
@@ -151,7 +151,7 @@ func init() {
        root := runtime.GOROOT()
        t, err := newTree(root)
        if err != nil {
-               log.Printf("go/build: invalid GOROOT %q: %v", root, err)
+               log.Printf("invalid GOROOT %q: %v", root, err)
        } else {
                t.Goroot = true
                Path = []*Tree{t}
@@ -163,7 +163,7 @@ func init() {
                }
                t, err := newTree(p)
                if err != nil {
-                       log.Printf("go/build: invalid GOPATH %q: %v", p, err)
+                       log.Printf("invalid GOPATH %q: %v", p, err)
                        continue
                }
                Path = append(Path, t)