]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: fix a couple of errors found by "go vet"
authorRob Pike <r@golang.org>
Fri, 15 Aug 2014 19:35:01 +0000 (12:35 -0700)
committerRob Pike <r@golang.org>
Fri, 15 Aug 2014 19:35:01 +0000 (12:35 -0700)
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/127410043

src/cmd/go/build.go
src/cmd/go/vcs_test.go

index 591eb1620aa1649c9f2c4c10e99b83e084a0b0b1..fd92ca27830ad4c3ec78a39c0887af62c5164ee3 100644 (file)
@@ -885,7 +885,7 @@ func (b *builder) build(a *action) (err error) {
        }
 
        if len(gofiles) == 0 {
-               return &build.NoGoError{a.p.Dir}
+               return &build.NoGoError{Dir: a.p.Dir}
        }
 
        // If we're doing coverage, preprocess the .go files and put them in the work directory
index 3097c4d1c5ecbc2e6506af36ed5cdf9b735176fb..14d681ba6afc5e1f88f566a27322874c53e77ed1 100644 (file)
@@ -109,7 +109,7 @@ func TestRepoRootForImportPath(t *testing.T) {
 
                if want == nil {
                        if err == nil {
-                               t.Errorf("RepoRootForImport(%q): Error expected but not received")
+                               t.Errorf("RepoRootForImport(%q): Error expected but not received", test.path)
                        }
                        continue
                }