tinylib / msgp

A Go code generator for MessagePack / msgpack.org[Go]
MIT License
1.79k stars 190 forks source link

added blank identifier to mask to prevent edge case #310

Closed Alexander-Leon closed 2 years ago

Alexander-Leon commented 2 years ago

There's an edge case where if all the fields within a struct provide their own marshal/encode methods the mask doesn't end up being used at all which then causes the compiler "unused variable" flags to prevent compilation. This doesn't change the base operation of the functionality, but avoids needing to go manually adjust the auto generated code when this edge case comes up.

philhofer commented 2 years ago

Thanks!