aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2016-02-08 22:50:17 -0500
committerRuss Cox <rsc@golang.org>2016-02-09 20:36:06 +0000
commit97572d5552699fbc7cce215f83d7b02265e7f1de (patch)
treea87148635dd183b132287a39a60da30942e26dcc
parent6a208efbdfa939dc236a63383df19c7ab44aa50a (diff)
downloadgo-97572d5552699fbc7cce215f83d7b02265e7f1de.tar.gz
go-97572d5552699fbc7cce215f83d7b02265e7f1de.zip
cmd/go: silence standard imports non-standard error for non-existent import target
This error only affects the compilation of the standard library, but I discovered that if you import "notexist" from the standard library then you get both an error about notexist not existing and an error about notexist being a non-standard package (because the non-existant package is in fact not a standard package). Silence the second error. Change-Id: Ib4c1523e89844260fde90de3459ec1e752df8f25 Reviewed-on: https://go-review.googlesource.com/19383 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r--src/cmd/go/pkg.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/pkg.go b/src/cmd/go/pkg.go
index a804ccd277..0c0cf07e71 100644
--- a/src/cmd/go/pkg.go
+++ b/src/cmd/go/pkg.go
@@ -967,7 +967,7 @@ func (p *Package) load(stk *importStack, bp *build.Package, err error) *Package
}
}
}
- if p.Standard && !p1.Standard && p.Error == nil {
+ if p.Standard && p.Error == nil && !p1.Standard && p1.Error == nil {
p.Error = &PackageError{
ImportStack: stk.copy(),
Err: fmt.Sprintf("non-standard import %q in standard package %q", path, p.ImportPath),