I used export GO111MODULE=on
when i type go get -u github.com/swaggo/swag/cmd/swag
I got go get: disabled by -mod=vendor
so i can't use the go get any more, anyone who can help me?
and my go env
like this:
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/maple/Library/Caches/go-build"
GOEXE=""
GOFLAGS=" -mod=vendor"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/maple/go"
GOPROXY="https://goproxy.io"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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=/var/folders/b0/gjtsl1sn61977y7xldkg5f540000gn/T/go-build663727012=/tmp/go-build -gno-record-gcc-switches -fno-common"
i found there has a GOFLAGS=" -mod=vendor"
, how can i change it?
GOFLAGS= go get -u github.com/swaggo/swag/cmd/swag
– Titleholder