go mod init 在初始化时出现 cannot determine module path for source directory (outside GOPATH
问题:新创建的golang项目,使用 go mod init 命令时出现 cannot determine module path for source directory xxxxxxx (outside GOPATH, module path must be specified)解决方案:这是因为go mod init 初始化项目时,需要定义一个 module ,我们打开一个 go.mod 文件,就会发现第一行就有module ProjectName因此,在执行 go mod init 时需