{"action":"created","issue":{"url":"https://api.github.com/repos/alanctgardner/gogen-avro/issues/25","repository_url":"https://api.github.com/repos/alanctgardner/gogen-avro","labels_url":"https://api.github.com/repos/alanctgardner/gogen-avro/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/alanctgardner/gogen-avro/issues/25/comments","events_url":"https://api.github.com/repos/alanctgardner/gogen-avro/issues/25/events","html_url":"https://github.com/alanctgardner/gogen-avro/issues/25","id":217757471,"number":25,"title":"Handling default values","user":{"login":"rikonor","id":3395638,"avatar_url":"https://avatars0.githubusercontent.com/u/3395638?v=3","gravatar_id":"","url":"https://api.github.com/users/rikonor","html_url":"https://github.com/rikonor","followers_url":"https://api.github.com/users/rikonor/followers","following_url":"https://api.github.com/users/rikonor/following{/other_user}","gists_url":"https://api.github.com/users/rikonor/gists{/gist_id}","starred_url":"https://api.github.com/users/rikonor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rikonor/subscriptions","organizations_url":"https://api.github.com/users/rikonor/orgs","repos_url":"https://api.github.com/users/rikonor/repos","events_url":"https://api.github.com/users/rikonor/events{/privacy}","received_events_url":"https://api.github.com/users/rikonor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-29T03:49:54Z","updated_at":"2017-04-05T19:00:37Z","closed_at":null,"body":"Hey Alan,\r\n\r\nI noticed that `default` values don't seem to be handled at the moment (unless I'm missing something).\r\n\r\nI generated code based on:\r\n```\r\n{\r\n    \"type\": \"record\",\r\n    \"name\": \"example\",\r\n    \"subject\": \"example\",\r\n    \"fields\": [\r\n        {\r\n            \"name\": \"name\",\r\n            \"type\": \"string\"\r\n        },\r\n        {\r\n            \"name\": \"hobby\",\r\n            \"type\": \"string\",\r\n            \"default\": \"golf\"\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\nThen ran:\r\n```go\r\nfunc main() {\r\n\tel := example.Example{\r\n\t\tName: \"Or\",\r\n\t\t// Hobby: \"PRs\",\r\n\t}\r\n\r\n\tvar buf bytes.Buffer\r\n\tif err := el.Serialize(&buf); err != nil {\r\n\t\tlog.Fatal(err)\r\n\t}\r\n\r\n\teln, err := example.DeserializeExample(&buf)\r\n\tif err != nil {\r\n\t\tlog.Fatal(err)\r\n\t}\r\n\r\n\tfmt.Printf(\"%+v\\n\", eln)\r\n}\r\n```\r\n\r\nwhich output:\r\n```\r\n&{Name:Or Hobby:}\r\n```\r\n\r\nIf I uncomment the line above, I get a value as expected."},"comment":{"url":"https://api.github.com/repos/alanctgardner/gogen-avro/issues/comments/291962306","html_url":"https://github.com/alanctgardner/gogen-avro/issues/25#issuecomment-291962306","issue_url":"https://api.github.com/repos/alanctgardner/gogen-avro/issues/25","id":291962306,"user":{"login":"rikonor","id":3395638,"avatar_url":"https://avatars0.githubusercontent.com/u/3395638?v=3","gravatar_id":"","url":"https://api.github.com/users/rikonor","html_url":"https://github.com/rikonor","followers_url":"https://api.github.com/users/rikonor/followers","following_url":"https://api.github.com/users/rikonor/following{/other_user}","gists_url":"https://api.github.com/users/rikonor/gists{/gist_id}","starred_url":"https://api.github.com/users/rikonor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rikonor/subscriptions","organizations_url":"https://api.github.com/users/rikonor/orgs","repos_url":"https://api.github.com/users/rikonor/repos","events_url":"https://api.github.com/users/rikonor/events{/privacy}","received_events_url":"https://api.github.com/users/rikonor/received_events","type":"User","site_admin":false},"created_at":"2017-04-05T19:00:37Z","updated_at":"2017-04-05T19:00:37Z","body":"No worries. Thanks a lot for you work Alan!"}}
{"actor":{"display_login":"rikonor"}}