Skip to content
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

[Question] How to generate go validate code using protoc? #275

Closed
ttc0419 opened this issue Nov 25, 2024 · 1 comment
Closed

[Question] How to generate go validate code using protoc? #275

ttc0419 opened this issue Nov 25, 2024 · 1 comment
Labels
Bug Something isn't working

Comments

@ttc0419
Copy link

ttc0419 commented Nov 25, 2024

What's the equivalent command for protoc?

@ttc0419 ttc0419 added the Bug Something isn't working label Nov 25, 2024
@nicksnyder
Copy link
Member

Protovalidate does not require any code generation. The protovalidate-go repository has an example for how to do validation in Go: https://github.com/bufbuild/protovalidate-go?tab=readme-ov-file#example

rodaine pushed a commit that referenced this issue Nov 26, 2024
`protoc-gen-validate` is a plugin that generates validation code.
`protovalidate` uses runtime libraries instead, and does not require
code generation.

This seems to be a frequent point of confusion for users when migrating.
E.g. #275,
#269,
#177,
#178,
#73,
#47.

I suggest we spell out this major difference in the main readme and the
migration guide.

---------

Co-authored-by: Philip K. Warren <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants