Update go version
This commit is contained in:
8
vendor/golang.org/x/tools/cmd/goimports/goimports.go
generated
vendored
8
vendor/golang.org/x/tools/cmd/goimports/goimports.go
generated
vendored
@@ -19,6 +19,7 @@ import (
|
||||
"runtime"
|
||||
"runtime/pprof"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/telemetry/counter"
|
||||
"golang.org/x/tools/internal/gocommand"
|
||||
@@ -199,7 +200,8 @@ func walkDir(path string) {
|
||||
}
|
||||
|
||||
func main() {
|
||||
// is anyone using this command?
|
||||
// Measure how many people still use goimports.
|
||||
// (See https://go.dev/issue/78671 for one.)
|
||||
counter.Open()
|
||||
counter.Inc("tools/cmd:goimports")
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
@@ -208,7 +210,9 @@ func main() {
|
||||
// so that it can use defer and have them
|
||||
// run before the exit.
|
||||
gofmtMain()
|
||||
os.Exit(exitCode)
|
||||
if !testing.Testing() {
|
||||
os.Exit(exitCode)
|
||||
}
|
||||
}
|
||||
|
||||
// parseFlags parses command line flags and returns the paths to process.
|
||||
|
||||
Reference in New Issue
Block a user