美文网首页
cannot find module providing pac

cannot find module providing pac

作者: langlyyy | 来源:发表于2020-03-28 16:23 被阅读0次
example.go:3:8: cannot find module providing package github.com/gin-gonic/gin: working directory is not part of a module

Compilation finished with exit code 1

执行go example 报异常,根据网上提示可以这样解决

F:\go\project_1\gin_frame>go mod init
go: cannot determine module path for source directory F:\go\project_1\gin_frame (outside GOPATH, module path must be specified)

Example usage:
        'go mod init example.com/m' to initialize a v0 or v1 module
        'go mod init example.com/m/v2' to initialize a v2 module

Run 'go help mod init' for more information.

F:\go\project_1\gin_frame>go mod init example.com/m
go: creating new go.mod: module example.com/m


自己可以根据相应的提示进行操作
go mod init example.com/m

相关文章

网友评论

      本文标题:cannot find module providing pac

      本文链接:https://www.haomeiwen.com/subject/qphsuhtx.html