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 13:53:04 Loading input failed: exit status 1
时间: 2023-08-11 09:03:16 浏览: 318
ICMP协议-ccnp3 tcp/ip协议
这个问题看起来是关于使用 mockgen 工具时出现的错误。根据错误提示,似乎缺少了一些模块,需要下载。你可以尝试在终端中运行以下命令来下载缺少的模块:
```
go mod download github.com/golang/mock
```
此外,还有两个文件缺失,分别是 go.mod 和 go.sum 文件。你可以在当前目录或任何父目录中创建这两个文件,或者使用命令来生成它们:
```
go mod init <module-name>
```
替换 <module-name> 为你的模块名称即可。这样,你就可以继续使用 mockgen 工具来生成代码。
阅读全文