{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/10964","labels_url":"https://api.github.com/repos/golang/go/issues/10964/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/10964/comments","events_url":"https://api.github.com/repos/golang/go/issues/10964/events","html_url":"https://github.com/golang/go/issues/10964","id":81315406,"number":10964,"title":"net/url: Userinfo should support encoding/gob","user":{"login":"chowey","id":991221,"avatar_url":"https://avatars.githubusercontent.com/u/991221?v=3","gravatar_id":"","url":"https://api.github.com/users/chowey","html_url":"https://github.com/chowey","followers_url":"https://api.github.com/users/chowey/followers","following_url":"https://api.github.com/users/chowey/following{/other_user}","gists_url":"https://api.github.com/users/chowey/gists{/gist_id}","starred_url":"https://api.github.com/users/chowey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chowey/subscriptions","organizations_url":"https://api.github.com/users/chowey/orgs","repos_url":"https://api.github.com/users/chowey/repos","events_url":"https://api.github.com/users/chowey/events{/privacy}","received_events_url":"https://api.github.com/users/chowey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/24","html_url":"https://github.com/golang/go/milestones/Go1.6","labels_url":"https://api.github.com/repos/golang/go/milestones/24/labels","id":1096159,"number":24,"title":"Go1.6","description":"","creator":{"login":"josharian","id":67496,"avatar_url":"https://avatars.githubusercontent.com/u/67496?v=3","gravatar_id":"","url":"https://api.github.com/users/josharian","html_url":"https://github.com/josharian","followers_url":"https://api.github.com/users/josharian/followers","following_url":"https://api.github.com/users/josharian/following{/other_user}","gists_url":"https://api.github.com/users/josharian/gists{/gist_id}","starred_url":"https://api.github.com/users/josharian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josharian/subscriptions","organizations_url":"https://api.github.com/users/josharian/orgs","repos_url":"https://api.github.com/users/josharian/repos","events_url":"https://api.github.com/users/josharian/events{/privacy}","received_events_url":"https://api.github.com/users/josharian/received_events","type":"User","site_admin":false},"open_issues":312,"closed_issues":256,"state":"open","created_at":"2015-05-05T02:39:06Z","updated_at":"2015-11-05T16:11:09Z","due_on":"2016-01-31T08:00:00Z","closed_at":null},"comments":3,"created_at":"2015-05-27T07:03:11Z","updated_at":"2015-11-05T16:13:51Z","closed_at":null,"body":"Currently the `encoding/gob` package does not support embedded structs with no exported fields. See #5819.\r\n\r\nThis 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.\r\n\r\nThis is solvable without modification to the `encoding/gob` if we fix `url.Userinfo`. This is possible by implementing `encoding.BinaryMarshaler` and `encoding.BinaryUnmarshaler`:\r\n\r\n```\r\nfunc (u *Userinfo) UnmarshalBinary(data []byte) error {\r\n\treturn nil\r\n}\r\n\r\nfunc (u *Userinfo) MarshalBinary() (data []byte, err error) {\r\n\treturn nil, nil\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/154107719","html_url":"https://github.com/golang/go/issues/10964#issuecomment-154107719","issue_url":"https://api.github.com/repos/golang/go/issues/10964","id":154107719,"user":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T16:13:51Z","updated_at":"2015-11-05T16:13:51Z","body":"If we're going to do something for url.URL, why not give URL MarshalText/UnmarshalText methods instead? Why work on this tiny piece of the URL instead of the whole thing?\n\nThat said, we have to proceed very carefully here because of backwards compatibility concerns. It may not happen for 1.6."}}