go-proto-validators icon indicating copy to clipboard operation
go-proto-validators copied to clipboard

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

Open tmc opened this issue 9 years ago • 3 comments

I feel like "exists" would be more general.

tmc avatar Apr 20 '17 18:04 tmc

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

mwitkow avatar May 17 '17 20:05 mwitkow

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.

thurt avatar Nov 17 '17 00:11 thurt

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

tmc avatar Nov 17 '17 17:11 tmc