GoLand未检测到$GOPATH/pkg/mod下的供应商软件包?

GoLand未检测到$GOPATH/pkg/mod下的供应商软件包?,go,build,goland,go-modules,Go,Build,Goland,Go Modules,Goland未检测到从github.com导入的模块。模块位于$GOPATH/pkg/mod目录中,但导入未解析。供应商目录还下载了所有软件包 Goland版本:2019.3.3 Go版本:Go 1.13.7 首选项下: - GOROOT is set to /usr/local/go - Global GOPATH is set to /Users/xyz/go - Go module integration is enabled - Enable vendoring support

Goland未检测到从github.com导入的模块。模块位于$GOPATH/pkg/mod目录中,但导入未解析。供应商目录还下载了所有软件包

Goland版本:2019.3.3 Go版本:Go 1.13.7

首选项下:

 - GOROOT is set to /usr/local/go
 - Global GOPATH is set to /Users/xyz/go
 - Go module integration is enabled
 - Enable vendoring support is enabled. 
 - dep integration is not enabled. 
项目结构:

- project-name
  - bin
  - build
  - cmd
     - serviced
        - main.go
  - internal 
    - config
      - config.go
  - vendor
    - github.com
      - .....
  - go.mod 

- External Libraries
  - GO SDK 1.13.7

值得一提的是,Goland没有下载外部库下的Go模块

将所有
src
库下载到
$GOPATH/pkg/mod

go mod download 
创建
供应商
目录(
/vendor
)使用
供应商
标志

1.14版本之前的版本

使用
供应商
标志生成

1.14及以上()

当主模块包含顶级
供应商
目录且其
go.mod
文件指定go 1.14或更高版本时,对于接受该标志的操作,go命令现在默认为
-mod=vendor
。该标志的一个新值,
-mod=mod
,将导致go命令从模块缓存加载模块(与不存在供应商目录时一样)


project name
目录(其中包含
go.mod
)中执行将所有
src
库下载到
$GOPATH/pkg/mod

go mod download 
创建
供应商
目录(
/vendor
)使用
供应商
标志

1.14版本之前的版本

使用
供应商
标志生成

1.14及以上()

当主模块包含顶级
供应商
目录且其
go.mod
文件指定go 1.14或更高版本时,对于接受该标志的操作,go命令现在默认为
-mod=vendor
。该标志的一个新值,
-mod=mod
,将导致go命令从模块缓存加载模块(与不存在供应商目录时一样)


project name
目录中执行(其中包含
go.mod

我们最近修复了一些相关的bug。请更新至2019.3.4,好吗?有帮助吗?$GOPATH/pkg/mod与vendoring完全无关。我们最近修复了一些相关的bug。请更新至2019.3.4,好吗?这有帮助吗?$GOPATH/pkg/mod与vendoring完全无关。
go build -mod=vendor
GOFLAGS="-mod=vendor" go build