{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/16147","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/16147/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/16147/comments","events_url":"https://api.github.com/repos/golang/go/issues/16147/events","html_url":"https://github.com/golang/go/issues/16147","id":161612498,"number":16147,"title":"gob decode nil value occur EOF error","user":{"login":"linlexing","id":834303,"avatar_url":"https://avatars.githubusercontent.com/u/834303?v=3","gravatar_id":"","url":"https://api.github.com/users/linlexing","html_url":"https://github.com/linlexing","followers_url":"https://api.github.com/users/linlexing/followers","following_url":"https://api.github.com/users/linlexing/following{/other_user}","gists_url":"https://api.github.com/users/linlexing/gists{/gist_id}","starred_url":"https://api.github.com/users/linlexing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linlexing/subscriptions","organizations_url":"https://api.github.com/users/linlexing/orgs","repos_url":"https://api.github.com/users/linlexing/repos","events_url":"https://api.github.com/users/linlexing/events{/privacy}","received_events_url":"https://api.github.com/users/linlexing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-22T07:34:22Z","updated_at":"2016-06-22T11:51:42Z","closed_at":null,"body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n1. What version of Go are you using (`go version`)?\r\ngo version go1.6.2 windows/amd64\r\n\r\n2. What operating system and processor architecture are you using (`go env`)?\r\nset GOARCH=amd64\r\nset GOBIN=\r\nset GOEXE=.exe\r\nset GOHOSTARCH=amd64\r\nset GOHOSTOS=windows\r\nset GOOS=windows\r\nset GOPATH=d:\\skydrive\\go\r\nset GORACE=\r\nset GOROOT=C:\\Go\r\nset GOTOOLDIR=C:\\Go\\pkg\\tool\\windows_amd64\r\nset GO15VENDOREXPERIMENT=1\r\nset CC=gcc\r\nset GOGCCFLAGS=-m64 -mthreads -fmessage-length=0\r\nset CXX=g++\r\nset CGO_ENABLED=1\r\n\r\n3. What did you do?\r\nhttps://play.golang.org/p/faypK8uobF\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"bytes\"\r\n\t\"encoding/gob\"\r\n\t\"log\"\r\n)\r\n\r\ntype T struct {\r\n\tA int\r\n}\r\n\r\nfunc init() {\r\n\tgob.Register(map[string]interface{}{})\r\n\tgob.Register(new(T))\r\n}\r\nfunc main() {\r\n\tbys := bytes.NewBuffer(nil)\r\n\tgob.NewEncoder(bys).Encode(map[string]interface{}{\r\n\t\t\"v\": (*T)(nil),\r\n\t})\r\n\tout := map[string]interface{}{}\r\n\tif err := gob.NewDecoder(bys).Decode(&out); err != nil {\r\n\t\tlog.Panic(err)\r\n\t}\r\n\treturn\r\n}\r\n```\r\n\r\n4. What did you expect to see?\r\nno error\r\n\r\n5. What did you see instead?\r\npanic: EOF\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/227720540","html_url":"https://github.com/golang/go/issues/16147#issuecomment-227720540","issue_url":"https://api.github.com/repos/golang/go/issues/16147","id":227720540,"user":{"login":"linlexing","id":834303,"avatar_url":"https://avatars.githubusercontent.com/u/834303?v=3","gravatar_id":"","url":"https://api.github.com/users/linlexing","html_url":"https://github.com/linlexing","followers_url":"https://api.github.com/users/linlexing/followers","following_url":"https://api.github.com/users/linlexing/following{/other_user}","gists_url":"https://api.github.com/users/linlexing/gists{/gist_id}","starred_url":"https://api.github.com/users/linlexing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linlexing/subscriptions","organizations_url":"https://api.github.com/users/linlexing/orgs","repos_url":"https://api.github.com/users/linlexing/repos","events_url":"https://api.github.com/users/linlexing/events{/privacy}","received_events_url":"https://api.github.com/users/linlexing/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T11:51:42Z","updated_at":"2016-06-22T11:51:42Z","body":"I got a very detailed answer .\r\n\r\nhttp://stackoverflow.com/questions/37962021/gob-attempting-to-decode-nil-value-results-in-eof-error"}}
{"actor":{"display_login":"linlexing"}}