go mod init

大象笔记 > 标签 > go mod init

cannot find module providing package github.com/xxx: working directory is not part of a module

运行 goadmin 时,报错 $ go run main.go main.go:4:2: cannot find module providing package github.com/GoAdminGroup/go-admin/adapter/gin: working directory is not part of a module ... 解决方法 $ go mod init sunzhongwei.com/goadmin go: creating new go.mod: module sunzhongwei.com/goadmin 此时,目录下会新建 go.mod 文件,定义了各 ...

阅读全文...