mockgen -destination db/mock/store.go github.com/projects/simplebank/db/sqlc Store prog.go:12:2: missing go.sum entry for module providing package github.com/golang/mock/mockgen/model; to add: go mod download github.com/golang/mock prog.go:12:2: missing go.sum entry for module providing package github.com/golang/mock/mockgen/model; to add: go mod download github.com/golang/mock prog.go:12:2: no required module provides package github.com/golang/mock/mockgen/model: go.mod file not found in current directory or any parent directory; see 'go help modules' prog.go:14:2: no required module provides package github.com/projects/simplebank/db/sqlc: go.mod file not found in current directory or any parent directory; see 'go help modules' 2023/06/06 11:26:02 Loading input failed: exit status 1
时间: 2024-01-29 11:02:26 浏览: 132
ICMP协议-ccnp3 tcp/ip协议
这是一个关于使用 mockgen 工具时出现的错误。错误信息提示缺少 go.sum 文件中的条目,需要执行 "go mod download github.com/golang/mock" 命令来下载依赖。同时也需要检查当前目录或其父目录下是否存在 go.mod 文件。如果缺少该文件,可以运行 "go mod init" 命令来初始化项目的模块。
阅读全文