mirror of
https://github.com/golang/go
synced 2024-11-05 15:06:09 -07:00
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>
This commit is contained in:
parent
658b03bcd3
commit
2b0b585e22
@ -21,7 +21,6 @@ import (
|
||||
"go/token"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"regexp"
|
||||
"strconv"
|
||||
@ -155,12 +154,6 @@ func initialize(filename string, src []byte, opt *Options) ([]byte, *Options, er
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user