No API to check for field's presence
Closed this issue · 2 comments
vvoznesensky commented
Hi there.
There seems to be no interface to check if some field is present or absent in a message.
How to understand if some optional scalar field is omitted?
Thanks in advance.
co11ter commented
Hi!
You can use pointer like there:
Line 41 in b9b6ceb
Also, you can check field.Value
is nil or not: https://github.com/co11ter/goFAST/blob/master/example_decoder_test.go#L71
vvoznesensky commented
Thank you