在使用 go mod 后(go 1.11 开始支持, go 1.14 全面推荐), 无需在 GOPATH 的 src 下存在项目目录, 可以随意存放.
go 包依赖管理 gopath > go vender > go module, 参考 # 一文搞懂 Go Modules 前世今生及入门使用
GOPATH 则只存放第三方包, 若不设置, 默认为 /[user]/go 目录
goland 配置 GOROOT, GOPATH 及 Go Modules


结果会在 External Libraries 中多出一个 Go Modules

网友评论