首页 > 其他分享 >GO mod not found

GO mod not found

时间:2022-11-25 11:24:37浏览次数:34  
标签:module go GO found GOWORKSPACE mod

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>

标签:module,go,GO,found,GOWORKSPACE,mod
From: https://www.cnblogs.com/anxbai/p/16924545.html

相关文章