encoding/gob: Encoder.Encode fails to encode maps with keys of type url.URL #32251
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/8-8Qws7ogyH
What did you expect to see?
Gob encoder successfully encodes a value of type
map[url.URL]something
.What did you see instead?
There's an error:
gob: unaddressable value of type *url.URL
, despite the fact that the map keys are of typeurl.URL
, not*url.URL
.The text was updated successfully, but these errors were encountered: