BurntSushi / toml

TOML parser for Golang with reflection.
MIT License
4.59k stars 529 forks source link

Allow custom string types as map keys #414

Closed arp242 closed 5 months ago

arp242 commented 5 months ago

Because the map keys were converted to []string, rv.MapIndex(reflect.ValueOf(mapKey)) would panic as it's the "wrong" type (string, instead of the custom string type).

Just keep track of the reflect.Value instead; don't really need to convert it to strings.

Fixes #413