tinylib / msgp

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

support for any maps in msgp.AppendIntf like in (*Writer).WriteIntf #340

Closed eliottness closed 4 months ago

eliottness commented 4 months ago

Hello :wave:

Previously when using AppendIntf with types like map[string][]any the function would throw an ErrUnsupportedType error.

So I added support for all values in maps using the reflect package just like it was already done in (*Writer).WriteIntf (by basically copying the code from (*Writer).writeMap).

I did not see any tests for this function so I was not comfortable to start writing a new testsuite. Please let me know if you want me to test my code.

klauspost commented 4 months ago

Would it be possible to add a few tests for this?

eliottness commented 4 months ago

@klauspost You merged while I added the tests :sob: Opening a new PR