{"action":"created","issue":{"url":"https://api.github.com/repos/gogo/protobuf/issues/517","repository_url":"https://api.github.com/repos/gogo/protobuf","labels_url":"https://api.github.com/repos/gogo/protobuf/issues/517/labels{/name}","comments_url":"https://api.github.com/repos/gogo/protobuf/issues/517/comments","events_url":"https://api.github.com/repos/gogo/protobuf/issues/517/events","html_url":"https://github.com/gogo/protobuf/issues/517","id":380652979,"node_id":"MDU6SXNzdWUzODA2NTI5Nzk=","number":517,"title":"Using naked request response","user":{"login":"egonelbre","id":192964,"node_id":"MDQ6VXNlcjE5Mjk2NA==","avatar_url":"https://avatars1.githubusercontent.com/u/192964?v=4","gravatar_id":"","url":"https://api.github.com/users/egonelbre","html_url":"https://github.com/egonelbre","followers_url":"https://api.github.com/users/egonelbre/followers","following_url":"https://api.github.com/users/egonelbre/following{/other_user}","gists_url":"https://api.github.com/users/egonelbre/gists{/gist_id}","starred_url":"https://api.github.com/users/egonelbre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egonelbre/subscriptions","organizations_url":"https://api.github.com/users/egonelbre/orgs","repos_url":"https://api.github.com/users/egonelbre/repos","events_url":"https://api.github.com/users/egonelbre/events{/privacy}","received_events_url":"https://api.github.com/users/egonelbre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-14T11:21:24Z","updated_at":"2018-12-05T06:41:46Z","closed_at":null,"author_association":"NONE","body":"Using the request/response types in services is a bit awkward in Go, it would look slightly nicer with unpacking the request and response structs.\r\n\r\nFor example:\r\n\r\n```\r\nservice Database {\r\n  rpc Put(PutRequest) returns (EmptyResponse);\r\n  rpc Get(GetRequest) returns (GetResponse);\r\n}\r\n\r\nmessage PutRequest {\r\n  string path = 1;\r\n  bytes  data = 2;\r\n}\r\n\r\nmessage EmptyResponse {}\r\n\r\nmessage GetRequest {\r\n  string path = 1;\r\n}\r\n\r\nmessage GetResponse {\r\n  bytes  data = 1;\r\n}\r\n```\r\n\r\nIt currently generates:\r\n\r\n```\r\nfunc (Database) Put(ctx context.Context, req *PutRequest) (*EmptyResponse, error) { ... }\r\nfunc (Database) Get(ctx context.Context, req *GetRequest) (*GetResponse, error) { ... }\r\n```\r\n\r\nHowever it would look nicer and clearer as:\r\n\r\n```\r\nfunc (Database) Put(ctx context.Context, path string, data []byte) error { ... }\r\nfunc (Database) Get(ctx context.Context, path string) ([]byte, error) { ... }\r\n```\r\n\r\n_I understand that it probably wouldn't work for all scenarios._"},"comment":{"url":"https://api.github.com/repos/gogo/protobuf/issues/comments/444376744","html_url":"https://github.com/gogo/protobuf/issues/517#issuecomment-444376744","issue_url":"https://api.github.com/repos/gogo/protobuf/issues/517","id":444376744,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDM3Njc0NA==","user":{"login":"egonelbre","id":192964,"node_id":"MDQ6VXNlcjE5Mjk2NA==","avatar_url":"https://avatars1.githubusercontent.com/u/192964?v=4","gravatar_id":"","url":"https://api.github.com/users/egonelbre","html_url":"https://github.com/egonelbre","followers_url":"https://api.github.com/users/egonelbre/followers","following_url":"https://api.github.com/users/egonelbre/following{/other_user}","gists_url":"https://api.github.com/users/egonelbre/gists{/gist_id}","starred_url":"https://api.github.com/users/egonelbre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egonelbre/subscriptions","organizations_url":"https://api.github.com/users/egonelbre/orgs","repos_url":"https://api.github.com/users/egonelbre/repos","events_url":"https://api.github.com/users/egonelbre/events{/privacy}","received_events_url":"https://api.github.com/users/egonelbre/received_events","type":"User","site_admin":false},"created_at":"2018-12-05T06:41:46Z","updated_at":"2018-12-05T06:41:46Z","author_association":"NONE","body":"Looks like they won't do it because they want to keep one canonical form of the service."}}
{"actor":{"display_login":"egonelbre"}}