payload: {"action":"created","issue":{"url":"https://api.github.com/repos/actgardner/gogen-avro/issues/40","repository_url":"https://api.github.com/repos/actgardner/gogen-avro","labels_url":"https://api.github.com/repos/actgardner/gogen-avro/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/actgardner/gogen-avro/issues/40/comments","events_url":"https://api.github.com/repos/actgardner/gogen-avro/issues/40/events","html_url":"https://github.com/actgardner/gogen-avro/issues/40","id":305869125,"node_id":"MDU6SXNzdWUzMDU4NjkxMjU=","number":40,"title":"Option to disable UnionNull... struct  code generation","user":{"login":"jozef-slezak","id":16844103,"node_id":"MDQ6VXNlcjE2ODQ0MTAz","avatar_url":"https://avatars2.githubusercontent.com/u/16844103?v=4","gravatar_id":"","url":"https://api.github.com/users/jozef-slezak","html_url":"https://github.com/jozef-slezak","followers_url":"https://api.github.com/users/jozef-slezak/followers","following_url":"https://api.github.com/users/jozef-slezak/following{/other_user}","gists_url":"https://api.github.com/users/jozef-slezak/gists{/gist_id}","starred_url":"https://api.github.com/users/jozef-slezak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jozef-slezak/subscriptions","organizations_url":"https://api.github.com/users/jozef-slezak/orgs","repos_url":"https://api.github.com/users/jozef-slezak/repos","events_url":"https://api.github.com/users/jozef-slezak/events{/privacy}","received_events_url":"https://api.github.com/users/jozef-slezak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-16T10:08:25Z","updated_at":"2019-02-06T15:27:53Z","closed_at":null,"author_association":"NONE","body":"Hello, I would like to propose a tweak (a code generation option) that would simplify the amount of generated structures just by using pointers in following situations:\r\n1. when a null and primitive type is used, for example [\"null\", \"int\"]\r\n2. when a null and record is used [\"null\", { \"type\" : \"record\" ...\r\n\r\nAbove tweaks are explained by using following examples:\r\n\r\n1. The first tweak can be explained on an example mentioned in existing README.md\r\n\r\nInstead of:\r\n```\r\ntype EnclosingRecord struct {\r\n\tField UnionNullInt\r\n}\r\n\r\ntype UnionNullInt struct {\r\n\t// All the possible types the union could take on\r\n\tNull               interface{}\r\n\tInt                int32\r\n\t// Which field actually has data in it - defaults to the first type in the list, \"null\"\r\n\tUnionType          UnionNullTypeEnum\r\n}\r\n```\r\n\r\nI am proposing: let's generate just pointer to primitive type - in this particular example it would be: \r\n```\r\ntype EnclosingRecord struct {\r\n\tField *int\r\n}\r\n```\r\n\r\n\r\n2. The second tweak:\r\n\r\nInstead of:\r\n```\r\ntype EnclosingRecord struct {\r\n\tField UnionNullRecordXY\r\n}\r\n\r\ntype UnionNullRecordXY struct {\r\n\t// All the possible types the union could take on\r\n\tNull               interface{}\r\n\tInt                *RecordXY\r\n\t// Which field actually has data in it - defaults to the first type in the list, \"null\"\r\n\tUnionType          UnionNullTypeEnum\r\n}\r\n```\r\n\r\nI am proposing: let's generate just pointer to record type - in this particular example it would be: \r\n```\r\ntype EnclosingRecord struct {\r\n\tField *RecordXY\r\n}\r\n```\r\n\r\nWhat do you think? If it makes sense to you, I could provide a pull request.\r\n\r\nThanks\r\n\r\nJozef"},"comment":{"url":"https://api.github.com/repos/actgardner/gogen-avro/issues/comments/461064451","html_url":"https://github.com/actgardner/gogen-avro/issues/40#issuecomment-461064451","issue_url":"https://api.github.com/repos/actgardner/gogen-avro/issues/40","id":461064451,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2MTA2NDQ1MQ==","user":{"login":"tzachshabtay","id":1819001,"node_id":"MDQ6VXNlcjE4MTkwMDE=","avatar_url":"https://avatars3.githubusercontent.com/u/1819001?v=4","gravatar_id":"","url":"https://api.github.com/users/tzachshabtay","html_url":"https://github.com/tzachshabtay","followers_url":"https://api.github.com/users/tzachshabtay/followers","following_url":"https://api.github.com/users/tzachshabtay/following{/other_user}","gists_url":"https://api.github.com/users/tzachshabtay/gists{/gist_id}","starred_url":"https://api.github.com/users/tzachshabtay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tzachshabtay/subscriptions","organizations_url":"https://api.github.com/users/tzachshabtay/orgs","repos_url":"https://api.github.com/users/tzachshabtay/repos","events_url":"https://api.github.com/users/tzachshabtay/events{/privacy}","received_events_url":"https://api.github.com/users/tzachshabtay/received_events","type":"User","site_admin":false},"created_at":"2019-02-06T15:27:53Z","updated_at":"2019-02-06T15:27:53Z","author_association":"NONE","body":"@jozef-slezak are you working on this?\r\nThis will be very useful for us.\r\nThanks."}}
other: {"actor":{"display_login":"tzachshabtay"}}