{"action":"created","issue":{"url":"https://api.github.com/repos/nelsam/hel/issues/10","labels_url":"https://api.github.com/repos/nelsam/hel/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/nelsam/hel/issues/10/comments","events_url":"https://api.github.com/repos/nelsam/hel/issues/10/events","html_url":"https://github.com/nelsam/hel/issues/10","id":122139735,"number":10,"title":"Fix Types Which Return Directional Channels","user":{"login":"nelsam","id":1019908,"avatar_url":"https://avatars.githubusercontent.com/u/1019908?v=3","gravatar_id":"","url":"https://api.github.com/users/nelsam","html_url":"https://github.com/nelsam","followers_url":"https://api.github.com/users/nelsam/followers","following_url":"https://api.github.com/users/nelsam/following{/other_user}","gists_url":"https://api.github.com/users/nelsam/gists{/gist_id}","starred_url":"https://api.github.com/users/nelsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nelsam/subscriptions","organizations_url":"https://api.github.com/users/nelsam/orgs","repos_url":"https://api.github.com/users/nelsam/repos","events_url":"https://api.github.com/users/nelsam/events{/privacy}","received_events_url":"https://api.github.com/users/nelsam/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nelsam/hel/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-14T21:52:32Z","updated_at":"2015-12-14T23:00:08Z","closed_at":null,"body":"Given:\r\n\r\n```go\r\ntype Foo interface {\r\n    Foo() (<-chan struct{})\r\n}\r\n```\r\n\r\nThe generated type looks like:\r\n\r\n```go\r\ntype mockFoo struct {\r\n    FooOutput struct {\r\n        ret0 chan<- chan struct{}\r\n    }\r\n}\r\n```\r\n\r\nThis could be an upstream issue with goimports/gofmt, or it could be that making a chan of directional chans isn't supported."},"comment":{"url":"https://api.github.com/repos/nelsam/hel/issues/comments/164587507","html_url":"https://github.com/nelsam/hel/issues/10#issuecomment-164587507","issue_url":"https://api.github.com/repos/nelsam/hel/issues/10","id":164587507,"user":{"login":"nelsam","id":1019908,"avatar_url":"https://avatars.githubusercontent.com/u/1019908?v=3","gravatar_id":"","url":"https://api.github.com/users/nelsam","html_url":"https://github.com/nelsam","followers_url":"https://api.github.com/users/nelsam/followers","following_url":"https://api.github.com/users/nelsam/following{/other_user}","gists_url":"https://api.github.com/users/nelsam/gists{/gist_id}","starred_url":"https://api.github.com/users/nelsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nelsam/subscriptions","organizations_url":"https://api.github.com/users/nelsam/orgs","repos_url":"https://api.github.com/users/nelsam/repos","events_url":"https://api.github.com/users/nelsam/events{/privacy}","received_events_url":"https://api.github.com/users/nelsam/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T23:00:08Z","updated_at":"2015-12-14T23:00:08Z","body":"Turns out this is a little more insidious than I initially thought.  There is no way without named types to create a channel of receive-only channels.\r\n\r\nThe fix will be to remove channel directions from function parameters and returns before generating types and constructors."}}