Description
What version of Go are you using (go version
)?
$ go version go version go1.11.1 linux/amd64
Does this issue reproduce with the latest release?
yes, and i used the latest version
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go envGOARCH="amd64"
GOBIN="/usr/local/go/bin"
GOCACHE="~/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="$Workspace/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build913779639=/tmp/go-build -gno-record-gcc-switches"
What did you do?
- create new project
- execute
go mod init
- modify
go.mod
exclude privaterepo.com/bb/bb
- copy my local module to vendor because the local module is on a private repo which not support https.
- now the vendor just like:
vendor
|-github.com/aa/aa
|-privaterepo.com/bb/bb
- import "privaterepo.com/bb/bb"
- execute
go build -mod vendor
- than i got error "cannot find module for path privaterepo.com/bb/bb"
- i always try with replace, but it also not work
replace privaterepo.com/bb/bb v0.0.0 => ./vendor/privaterepo.com/bb/bb
What did you expect to see?
I just want go mod
support i add local module and build success.
What did you see instead?
Before i used go dep
which support ignored can solve the problem. Now go mod
exclude not work for this.