Go:Unresolved dependency
1.版本
go:
EB@DESKTOP-K45IA6V MINGW64 ~/Desktop/ec
$ go env
set GO111MODULE=auto
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\EB\AppData\Local\go-build
set GOENV=C:\Users\EB\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=D:\workspace\gopath\pkg\mod
set GONOPROXY=gitlab.xxx.com
set GONOSUMDB=gitlab.xxx.com
set GOOS=windows
set GOPATH=D:\workspace\gopath
set GOPRIVATE=gitlab.xxx.com
set GOPROXY=https://goproxy.io
set GOROOT=C:\Program Files\Go
set GOSUMDB=off
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.16.4
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\EB\Desktop\ec\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\EB\AppData\Local\Temp\go-build3460452450=/tmp/go-build -gno-record-
gcc-switches
IDEA:
2.报错
go get github.com/labstack/echo/v4,打开go.mod文件:
标红:Unresolved dependency
3.解决
设置:Enable Go modules integration