{"action":"created","issue":{"url":"https://api.github.com/repos/google/flatbuffers/issues/212","labels_url":"https://api.github.com/repos/google/flatbuffers/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/google/flatbuffers/issues/212/comments","events_url":"https://api.github.com/repos/google/flatbuffers/issues/212/events","html_url":"https://github.com/google/flatbuffers/pull/212","id":80889818,"number":212,"title":"Generate type for enums in Go","user":{"login":"eproxus","id":112878,"avatar_url":"https://avatars.githubusercontent.com/u/112878?v=3","gravatar_id":"","url":"https://api.github.com/users/eproxus","html_url":"https://github.com/eproxus","followers_url":"https://api.github.com/users/eproxus/followers","following_url":"https://api.github.com/users/eproxus/following{/other_user}","gists_url":"https://api.github.com/users/eproxus/gists{/gist_id}","starred_url":"https://api.github.com/users/eproxus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eproxus/subscriptions","organizations_url":"https://api.github.com/users/eproxus/orgs","repos_url":"https://api.github.com/users/eproxus/repos","events_url":"https://api.github.com/users/eproxus/events{/privacy}","received_events_url":"https://api.github.com/users/eproxus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-26T09:56:37Z","updated_at":"2015-05-27T01:49:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/google/flatbuffers/pulls/212","html_url":"https://github.com/google/flatbuffers/pull/212","diff_url":"https://github.com/google/flatbuffers/pull/212.diff","patch_url":"https://github.com/google/flatbuffers/pull/212.patch"},"body":"**Unfinished** pull request for #197.\r\n\r\nThis _almost_ generates the code discussed in the issue:\r\n\r\n```go\r\ntype Color int8\r\n\r\nconst (\r\n    Red Color = 1\r\n    Green = 2\r\n    Blue = 3\r\n)\r\n```\r\n\r\nWhat's left:\r\n\r\n- [ ] Type is not identical (e.g. `int8` instead of `byte`)\r\n- [ ] Figure out how to test this (`go_test.go` does not deal with enums directly)\r\n- [ ] Can enums have anything else than simple types (vectors, structs)?"},"comment":{"url":"https://api.github.com/repos/google/flatbuffers/issues/comments/105718111","html_url":"https://github.com/google/flatbuffers/pull/212#issuecomment-105718111","issue_url":"https://api.github.com/repos/google/flatbuffers/issues/212","id":105718111,"user":{"login":"rw","id":21367,"avatar_url":"https://avatars.githubusercontent.com/u/21367?v=3","gravatar_id":"","url":"https://api.github.com/users/rw","html_url":"https://github.com/rw","followers_url":"https://api.github.com/users/rw/followers","following_url":"https://api.github.com/users/rw/following{/other_user}","gists_url":"https://api.github.com/users/rw/gists{/gist_id}","starred_url":"https://api.github.com/users/rw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rw/subscriptions","organizations_url":"https://api.github.com/users/rw/orgs","repos_url":"https://api.github.com/users/rw/repos","events_url":"https://api.github.com/users/rw/events{/privacy}","received_events_url":"https://api.github.com/users/rw/received_events","type":"User","site_admin":false},"created_at":"2015-05-27T01:49:18Z","updated_at":"2015-05-27T01:49:18Z","body":"Or even:\r\n\r\n```go\r\npackage main\r\n\r\nimport \"fmt\"\r\n\r\ntype Foo int\r\n\r\nfunc main() {\r\n\tvar x Foo\r\n\tt := fmt.Sprintf(\"%T\", x)\r\n\tfmt.Printf(\"is x a main.Foo? %v\", t == \"main.Foo\")\r\n}\r\n```"}}