zeromicro / go-zero

A cloud-native Go microservices framework with cli tool for productivity.
https://go-zero.dev
MIT License
28.88k stars 3.91k forks source link

goctl model: The generated files are inconsistent with the tutorial. #1772

Closed capyun closed 2 years ago

capyun commented 2 years ago

goctl model mysql ddl -src user.sql -dir . -c In tutorial, this cmd just generate usermodel.go and vars.go, but I get extra file named usermodel_gen.go. I am confused and need help.

kevwan commented 2 years ago

We separated the generated code and the handwritten code.

Thanks for your remind, we'll update the tutorials.

BTW: which url did you read?

capyun commented 2 years ago

thank you, url is https://go-zero.dev/cn/model-gen.html. BTW: In tutorial, I can use jwt by this, and I want to know how to use ouath2.0. @server( jwt: Auth )

image

yinwhm12 commented 2 years ago

hi, I have met the same issue. image

the tutorials url is : https://github.com/zeromicro/zero-doc/blob/main/doc/shorturl.md

kesonan commented 2 years ago

Done

kevwan commented 2 years ago

@capyun thanks for reporting and please verify.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 2 years ago

This issue was closed because it has been inactive for 14 days since being marked as stale.