0%

goland 无法下载依赖的问题

问题:在本机运行的时候,执行了 go get github.com/stretchr/testify 之后,go.mod 里面的内容如下图,都飘红了。而且执行 go mod tidy 会直接移除这几个依赖,但是我的项目却是要依赖于 github.com/stretchr/testify 的。

解决方法:goland 的配置中勾上 Enable Go modules intergration