-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
Currently the encoding/gob package does not support embedded structs with no exported fields. See #5819.
This is problematic for the net/url package. I cannot serialize a url.URL into a gob because url.Userinfo has no exported fields. I can't be the only one who has needed to serialize a struct with a URL in it.
This is solvable without modification to the encoding/gob if we fix url.Userinfo. This is possible by implementing encoding.BinaryMarshaler and encoding.BinaryUnmarshaler:
func (u *Userinfo) UnmarshalBinary(data []byte) error {
return nil
}
func (u *Userinfo) MarshalBinary() (data []byte, err error) {
return nil, nil
}
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.