{"action":"opened","issue":{"url":"https://api.github.com/repos/niubaoshu/gotiny/issues/2","repository_url":"https://api.github.com/repos/niubaoshu/gotiny","labels_url":"https://api.github.com/repos/niubaoshu/gotiny/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/niubaoshu/gotiny/issues/2/comments","events_url":"https://api.github.com/repos/niubaoshu/gotiny/issues/2/events","html_url":"https://github.com/niubaoshu/gotiny/issues/2","id":358254283,"node_id":"MDU6SXNzdWUzNTgyNTQyODM=","number":2,"title":"Better examples needed that are compatible with `encoding/gob`","user":{"login":"bmeh","id":35892409,"node_id":"MDQ6VXNlcjM1ODkyNDA5","avatar_url":"https://avatars2.githubusercontent.com/u/35892409?v=4","gravatar_id":"","url":"https://api.github.com/users/bmeh","html_url":"https://github.com/bmeh","followers_url":"https://api.github.com/users/bmeh/followers","following_url":"https://api.github.com/users/bmeh/following{/other_user}","gists_url":"https://api.github.com/users/bmeh/gists{/gist_id}","starred_url":"https://api.github.com/users/bmeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmeh/subscriptions","organizations_url":"https://api.github.com/users/bmeh/orgs","repos_url":"https://api.github.com/users/bmeh/repos","events_url":"https://api.github.com/users/bmeh/events{/privacy}","received_events_url":"https://api.github.com/users/bmeh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-08T01:56:57Z","updated_at":"2018-09-08T01:56:57Z","closed_at":null,"author_association":"NONE","body":"I believe better examples should be provided for anyone new to this library that uses the same convention as `encoding/gob`.\r\n\r\nDecoding:\r\n```go\r\nvar foo map[string]string\r\nif err = gob.NewDecoder(file).Decode(&foo); err != nil {\r\n  return err\r\n}\r\n```\r\n\r\nEncoding:\r\n```go\r\nbuf := new(bytes.Buffer)\r\nif err := gob.NewEncoder(buf).Encode(foo); err != nil {\r\n  return err\r\n}\r\n```\r\n\r\nNote: `file` is `*os.File` returned by `os.Open(path)`.\r\n\r\nAs far as I can tell, your functions don't return any errors. Is this intentional?"}}
{"actor":{"display_login":"bmeh"}}