{"action":"created","issue":{"url":"https://api.github.com/repos/cheekybits/genny/issues/13","labels_url":"https://api.github.com/repos/cheekybits/genny/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/cheekybits/genny/issues/13/comments","events_url":"https://api.github.com/repos/cheekybits/genny/issues/13/events","html_url":"https://github.com/cheekybits/genny/issues/13","id":107220493,"number":13,"title":"How do I... basetypes?","user":{"login":"falafflepotatoe","id":10060419,"avatar_url":"https://avatars.githubusercontent.com/u/10060419?v=3","gravatar_id":"","url":"https://api.github.com/users/falafflepotatoe","html_url":"https://github.com/falafflepotatoe","followers_url":"https://api.github.com/users/falafflepotatoe/followers","following_url":"https://api.github.com/users/falafflepotatoe/following{/other_user}","gists_url":"https://api.github.com/users/falafflepotatoe/gists{/gist_id}","starred_url":"https://api.github.com/users/falafflepotatoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/falafflepotatoe/subscriptions","organizations_url":"https://api.github.com/users/falafflepotatoe/orgs","repos_url":"https://api.github.com/users/falafflepotatoe/repos","events_url":"https://api.github.com/users/falafflepotatoe/events{/privacy}","received_events_url":"https://api.github.com/users/falafflepotatoe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-18T15:07:20Z","updated_at":"2015-10-09T09:54:32Z","closed_at":"2015-09-18T15:15:20Z","body":"Hey. I'm having good success with genny but now I have a spazzy-issues.\r\n\r\nCode:\r\n\r\n    func (arr *T) pop () BASETYPE { l := len(*arr)-1; val := (*arr)[l]; *arr = (*arr)[:l]; return val }\r\n\r\nQuestion\r\n\r\n   One.  is there any way to automatically deduce BASETYPE to int from T being []int?\r\nI tried:\r\n\r\n    func (arr *TSlice) pop () T { l := len(*arr)-1; val := (*arr)[l]; *arr = (*arr)[:l]; return val }\r\n\r\nbut after running `go generate` Tslice is named \"intSlice\" so I cannot export it, which is my next question:\r\n   Two.  I'm exporting my package so custom types have to be `Uppercased`, so the way I was building slices is no longer work. any suggestions on how to get \"intSlice\" to \"IntSlice\" if i generate with \"int\"? (so I can use it as as the base type) \r\n\r\n\r\nedit: NVM I should just use a second var. I'm still kind of curious as to the 2nd question, or if theres a basetype() API for genny though. Cheers and thanks for the software, most simple generator I've seen for Go."},"comment":{"url":"https://api.github.com/repos/cheekybits/genny/issues/comments/146817779","html_url":"https://github.com/cheekybits/genny/issues/13#issuecomment-146817779","issue_url":"https://api.github.com/repos/cheekybits/genny/issues/13","id":146817779,"user":{"login":"falafflepotatoe","id":10060419,"avatar_url":"https://avatars.githubusercontent.com/u/10060419?v=3","gravatar_id":"","url":"https://api.github.com/users/falafflepotatoe","html_url":"https://github.com/falafflepotatoe","followers_url":"https://api.github.com/users/falafflepotatoe/followers","following_url":"https://api.github.com/users/falafflepotatoe/following{/other_user}","gists_url":"https://api.github.com/users/falafflepotatoe/gists{/gist_id}","starred_url":"https://api.github.com/users/falafflepotatoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/falafflepotatoe/subscriptions","organizations_url":"https://api.github.com/users/falafflepotatoe/orgs","repos_url":"https://api.github.com/users/falafflepotatoe/repos","events_url":"https://api.github.com/users/falafflepotatoe/events{/privacy}","received_events_url":"https://api.github.com/users/falafflepotatoe/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T09:54:32Z","updated_at":"2015-10-09T09:54:32Z","body":"Question for you guys!\r\nI want to release my generated .go file as a package\r\nbut I want to include the src/template so they can add types and regenerate it.\r\nBut the template should not be in the pkg (the code/varnames conflict as the T variables are not defined)\r\n\r\nAny idea how to do this?\r\n\r\n"}}