Skip to content

The API demo and RPC demo generated by goctl do not include go.mod files. #4752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gopherhiro opened this issue Apr 4, 2025 · 2 comments

Comments

@gopherhiro
Copy link

gopherhiro commented Apr 4, 2025

goctl-generated project files lack go.mod

  1. Neither the api-demo nor rpc-demo generated by goctl contains a go.mod file
  2. It needs to be created manually
  3. This might make users suspect operational errors when none actually exist

https://go-zero.dev/docs/tasks/cli/api-demo
https://go-zero.dev/docs/tasks/cli/grpc-demo

The tutorial is well-written overall. I'm just reporting this minor issue by raising an issue.


goctl生成的项目文件中没有 go.mod 文件

1、goctl 生成的api-demo、rpc-demo中都没有go.mod文件。
2、需要手动创建。
3、所以,会以为操作步骤出错了,其实没有。

https://go-zero.dev/docs/tasks/cli/api-demo
https://go-zero.dev/docs/tasks/cli/grpc-demo

教程写得很好,就是发现了这个小问题,故而提一个issue

@gopherhiro
Copy link
Author

goctl --version
goctl version 1.8.1 darwin/amd64

@kevwan kevwan changed the title goctl 生成的api-demo、rpc-demo中都没有go.mod文件 The API demo and RPC demo generated by goctl do not include go.mod files. Apr 6, 2025
@kesonan
Copy link
Collaborator

kesonan commented Apr 17, 2025

Did you generate the project in the GOPATH subdirectory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants