1
0
mirror of https://github.com/golang/go synced 2024-11-18 06:14:46 -07:00
go/cmd
Annirudh Prasad 7480c7b454 goimport: prevent panic on parsing local prefix
The existing flag parsing logic doesn't initialize a ProcessEnv struct,
which results in a nil dereference when trying to access the LocalPrefix
property. The fix is to initialize the default options with an initialized
ProcessEnv.

Fixes #39862

Change-Id: I57cff249d6bf0ced6bb70e53174b2515fe9fbb97
GitHub-Last-Rev: 2d6e5f3af226088ddc4ed88198edd5c5ea469240
GitHub-Pull-Request: golang/tools#239
Reviewed-on: https://go-review.googlesource.com/c/tools/+/240019
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
2020-06-25 19:53:45 +00:00
..
auth cmd/auth/cookieauth: add a GOAUTH implementation that reads from a cookiefile 2019-04-05 18:06:40 +00:00
benchcmp cmd/benchcmp: add deprecation notice 2020-02-10 18:42:41 +00:00
bundle cmd/bundle: add -tags flag 2019-11-04 19:56:21 +00:00
callgraph all: skip tests if required tools are not found 2019-08-30 15:40:57 +00:00
compilebench cmd/compilebench: report rss measurement 2020-03-18 03:17:18 +00:00
cover cmd/cover: more clearly mark as deprecated 2020-05-22 20:15:01 +00:00
digraph all: fix some staticcheck errors 2020-01-29 04:53:41 +00:00
eg
fiximports all: fix some staticcheck errors 2020-01-29 04:53:41 +00:00
getgo all: fix some staticcheck errors 2020-01-29 04:53:41 +00:00
go-contrib-init cmd/go-contrib-init: add unit test for the cmdErr function 2019-11-11 20:03:10 +00:00
godex all: fix some staticcheck errors 2020-01-29 04:53:41 +00:00
godoc cmd/godoc: support automatic vendoring 2020-06-09 06:04:08 +00:00
goimports goimport: prevent panic on parsing local prefix 2020-06-25 19:53:45 +00:00
gomvpkg
gorename all: consolidate cgo requirement checks 2020-05-18 17:24:58 +00:00
gotype all: fix some staticcheck errors 2020-01-29 04:53:41 +00:00
goyacc
guru all: do not write to testdata directories 2019-08-30 17:05:20 +00:00
html2article
present all: run prettier on js and css 2020-05-28 15:31:44 +00:00
present2md present2md: fix depth count for blogs with sections 2020-03-17 20:55:21 +00:00
splitdwarf all: run go generate 2020-03-11 22:20:14 +00:00
ssadump
stress cmd/stress: use an ellipsis when truncating output 2020-01-22 22:00:14 +00:00
stringer cmd/stringer: remove redundant check in generated code 2020-01-14 01:55:19 +00:00
toolstash