GO mod not found

Go get 下载包的时候,会报错:go.mod file not found in current directory or any parent directory.
解决方法: 初始化项目, 比如我的项目名称叫 GOWORKSPACE

PS D:\goWorkSpace> go mod init GOWORKSPACE
go: creating new go.mod: module GOWORKSPACE
go: to add module requirements and sums:
go mod tidy
PS D:\goWorkSpace>

posted @ 2022-11-25 11:10  安小白learning  阅读(445)  评论(0编辑  收藏  举报