且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Github操作在存储库中找不到包

更新时间:2023-11-17 18:30:22

请确保运行go mod init MODULE_NAME(如果项目在GOROOT或GOPATH之外)或仅运行go mod init(如果项目在GOROOT或GOPATH内) .该命令应在项目的根文件夹上运行.这将创建一个go.mod文件,该文件将使go能够解析您的软件包.

Make sure to run go mod init MODULE_NAME (if the project is outside GOROOT or GOPATH) or just simply go mod init (if the project is inside GOROOT or GOPATH). The command should be run on the root folder of your project. This would create a go.mod file that would enable go resolve your packages.