mwitkow / go-proto-validators

Generate message validators from .proto annotations.
Apache License 2.0
1.09k stars 164 forks source link

"msg_exists" is a bit of an odd name for builtin fields #27

Open tmc opened 7 years ago

tmc commented 7 years ago

I feel like "exists" would be more general.

mwitkow commented 7 years ago

msg_exists will only work for nested messages, it won't work for simple types like int. Or did you mean something else?

thurt commented 6 years ago

I was initially confused by the wording in the README

the required keyword is back for proto3, under the guise of msg_exists

It made me think that msg_exists works like the proto2 required (ie you apply it to fields), but i suppose the emphasis should be on under the guise with an asterisk/fine-print beside it.

tmc commented 6 years ago

I'm parsing presence of this field and acting on it myself.