全局使用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安装试试

0
0

Go+Python打造电商系统 自研微服务框架 抓紧高薪机遇

快速转型Go工程师,成为具备双语言后端能力的开发者

508 学习 · 530 问题

查看课程