全局使用go get 报错
来源:1-12 windows下安装go和goland的配置 - 很重要!!

栽了清秋
2023-07-05
老师我全局使用go get 提示
C:\Users\qiqi> go get golang.org/x/tools/cmd/goimports
go: go.mod file not found in current directory or any parent directory.
‘go get’ is no longer supported outside a module.
To build and install a command, use ‘go install’ with a version,
like 'go install example.com/cmd@latest’
For more information, see https://golang.org/doc/go-get-install-deprecation
or run ‘go help get’ or ‘go help install’.
写回答
1回答
-
bobby
2023-07-12
这里提示go get命令已经开始不使用了,你使用go install安装试试
00
相似问题
go依赖命令 已经弃用了
回答 1
go protoc生成的时候报错了
回答 4