-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.modules
Milestone
Description
What version of Go are you using (go version)?
$ go version go version go1.12.5 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env GOARCH="amd64" GOBIN="" GOCACHE="/home/jaime/.cache/go-build" GOEXE="" GOFLAGS="-mod=vendor" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/jaime/go" GOPROXY="" GORACE="" GOROOT="/usr/local/go" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build448668772=/tmp/go-build -gno-record-gcc-switches"
What did you do?
I tried to install goimports from my home directory.
$ echo $GO111MODULE
on
$ echo $GOFLAGS
-mod=vendor
$ pwd
/home/jaime
$ go get golang.org/x/tools/cmd/goimports
go get: disabled by -mod=vendor
$
What did you expect to see?
I expected the tool to work like it has for years. I expected go get to download and install goimports.
What did you see instead?
I got an error about -mod=vendor being on.
In my environment, we use vendoring. Because Go is moving away from dep and moving towards modules, we've started doing the work to migrate to modules.
A temporary work around for this bug is to do this.
GO111MODULE=off go get golang.org/x/tools/cmd/goimports
jesseduffield, chrisgarland-vgw, AlekSi, LouisPlisso, skipmaple and 2 more
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.modules