Open rogpeppe opened 5 years ago
Is this error message descriptive enough, or should it be more specific?
=== RUN TestInvalidMapUnmarshal
--- PASS: TestInvalidMapUnmarshal (0.00s)
unmarshal_test.go:59: Error: plist: type mismatch: tried to decode plist type `dictionary'
into value of type `map[int]string'
Unmarshaling into a map with int keys will result in a panic. Although this key type is expressly forbidden, it would be more friendly to return an error in this case, or at least produce a panic message that's clearer than this:
Example code: