internal/imports: don't set a logger unless the user has provided it
Not sure why I thought it was a good idea to enable extra logging
by default, but this was added in CL 184198.
Fixes golang/go#37636
Change-Id: I1840a9e53625db99c9097f2c23500ae20d6dac1f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/221918
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
diff --git a/internal/imports/imports.go b/internal/imports/imports.go
index 2e7a317..b18daea 100644
--- a/internal/imports/imports.go
+++ b/internal/imports/imports.go
@@ -21,7 +21,6 @@
"go/token"
"io"
"io/ioutil"
- "log"
"os"
"regexp"
"strconv"
@@ -155,12 +154,6 @@
GOSUMDB: os.Getenv("GOSUMDB"),
}
}
-
- // Set the logger if the user has not provided it.
- if opt.Env.Logf == nil {
- opt.Env.Logf = log.Printf
- }
-
if src == nil {
b, err := ioutil.ReadFile(filename)
if err != nil {