We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
See this proto definiton as an example
syntax = "proto3"; option go_package = "example.com"; package examplepb; import "validate/validate.proto"; message Person { oneof optional_status { Status status = 1 [(validate.rules).enum = {not_in: [0]}] ; } optional Status additional_status = 2 [(validate.rules).enum = {not_in: [1]}] ; } enum Status { STATUS_UNKNOWN = 0; STATUS_ACTIVATED = 1; STATUS_DEACTIVATED = 2; }
The generated code looks like this
var _Person_Status_NotInLookup = map[*Status]struct{}{ 0: {}, }
As Status is a pointer we receive following error message:
0' (type untyped int) cannot be represented by the type *Status
Thanks for all the great work!
These are the header values of my pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.19.3 // source: example.proto
The text was updated successfully, but these errors were encountered:
FYI: The problem still exists with v0.6.4.
Sorry, something went wrong.
No branches or pull requests
See this proto definiton as an example
The generated code looks like this
As Status is a pointer we receive following error message:
Thanks for all the great work!
These are the header values of my pb.go
The text was updated successfully, but these errors were encountered: