Hi.

Consider this example:
https://play.golang.org/p/q7oEp40ZCIL

Unmarshal replaces the existing map entry with key "Postgres".
The documentation says:

    To unmarshal a JSON object into a map, Unmarshal first establishes a 
map to use.
     If the map is nil, Unmarshal allocates a new map.
     Otherwise Unmarshal reuses the existing map, keeping existing entries.
     Unmarshal then stores key-value pairs from the JSON object into the 
map.
     The map's key type must either be a string, an integer, or implement 
encoding.TextUnmarshaler.

Does the reported behavior conform to the documentation?
Personally, I would have expected the program to not panic.


Thanks
Manlio Perillo

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to