You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use map.keys.string.pattern and map.values.string.pattern rules in a single annotation, I can't compile the generated code.
For example, I have the following message definition:
Then the generated code have duplicate variables with the same name like this:
var _Labels_LabelMap_Pattern = regexp.MustCompile("^[a-z0-9A-Z._-]$")
var _Labels_LabelMap_Pattern = regexp.MustCompile("^[a-z0-9A-Z._-]$")
Which causes the build to fail with the following error:
pkg/proto/v1alpha/examples/labels.pb.validate.go:142:5: _Labels_LabelMap_Pattern redeclared in this block
previous declaration at pkg/proto/v1alpha/examples/labels.pb.validate.go:140:5
The text was updated successfully, but these errors were encountered:
Just a quick heads up – we've rolled out protovalidate, and it's free from the bug you mentioned here. Feel free to check it out and enjoy a smoother experience!
When I use map.keys.string.pattern and map.values.string.pattern rules in a single annotation, I can't compile the generated code.
For example, I have the following message definition:
Then the generated code have duplicate variables with the same name like this:
Which causes the build to fail with the following error:
The text was updated successfully, but these errors were encountered: