aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2020-07-05 23:39:45 -0400
committerRuss Cox <rsc@golang.org>2020-07-06 17:27:01 +0000
commitfcf1cb2cf51bae37a8d5d0425a39e21ce5073bff (patch)
treed2fa03fc42718fd2a4323dc1db68cf1902350f67
parent87db6d90c91f257f8ad152ace61fce829b193362 (diff)
downloadgo-fcf1cb2cf51bae37a8d5d0425a39e21ce5073bff.tar.gz
go-fcf1cb2cf51bae37a8d5d0425a39e21ce5073bff.zip
go/build: remove use of package log
package log does not belong here, even for an impossible condition. Change-Id: I6180a4f7766a8e5759db4f33d03703d0b678d0b4 Reviewed-on: https://go-review.googlesource.com/c/go/+/241077 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r--src/go/build/build.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/go/build/build.go b/src/go/build/build.go
index 1a122c615f..4a5da308a0 100644
--- a/src/go/build/build.go
+++ b/src/go/build/build.go
@@ -16,7 +16,6 @@ import (
"internal/goversion"
"io"
"io/ioutil"
- "log"
"os"
"os/exec"
pathpkg "path"
@@ -924,7 +923,7 @@ Found:
quoted := spec.Path.Value
path, err := strconv.Unquote(quoted)
if err != nil {
- log.Panicf("%s: parser returned invalid quoted string: <%s>", filename, quoted)
+ panic(fmt.Sprintf("%s: parser returned invalid quoted string: <%s>", filename, quoted))
}
fileImports = append(fileImports, importPos{path, spec.Pos()})
if path == "C" {