{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode-go/issues/370","repository_url":"https://api.github.com/repos/Microsoft/vscode-go","labels_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/370/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/370/comments","events_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/370/events","html_url":"https://github.com/Microsoft/vscode-go/pull/370","id":163277610,"number":370,"title":"Add command to extract method out of selected code","user":{"login":"ramya-rao-a","id":16890566,"avatar_url":"https://avatars.githubusercontent.com/u/16890566?v=3","gravatar_id":"","url":"https://api.github.com/users/ramya-rao-a","html_url":"https://github.com/ramya-rao-a","followers_url":"https://api.github.com/users/ramya-rao-a/followers","following_url":"https://api.github.com/users/ramya-rao-a/following{/other_user}","gists_url":"https://api.github.com/users/ramya-rao-a/gists{/gist_id}","starred_url":"https://api.github.com/users/ramya-rao-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramya-rao-a/subscriptions","organizations_url":"https://api.github.com/users/ramya-rao-a/orgs","repos_url":"https://api.github.com/users/ramya-rao-a/repos","events_url":"https://api.github.com/users/ramya-rao-a/events{/privacy}","received_events_url":"https://api.github.com/users/ramya-rao-a/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/vscode-go/labels/cla-not-required","name":"cla-not-required","color":"009800"}],"state":"closed","locked":false,"assignee":{"login":"egamma","id":172399,"avatar_url":"https://avatars.githubusercontent.com/u/172399?v=3","gravatar_id":"","url":"https://api.github.com/users/egamma","html_url":"https://github.com/egamma","followers_url":"https://api.github.com/users/egamma/followers","following_url":"https://api.github.com/users/egamma/following{/other_user}","gists_url":"https://api.github.com/users/egamma/gists{/gist_id}","starred_url":"https://api.github.com/users/egamma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egamma/subscriptions","organizations_url":"https://api.github.com/users/egamma/orgs","repos_url":"https://api.github.com/users/egamma/repos","events_url":"https://api.github.com/users/egamma/events{/privacy}","received_events_url":"https://api.github.com/users/egamma/received_events","type":"User","site_admin":false},"assignees":[{"login":"egamma","id":172399,"avatar_url":"https://avatars.githubusercontent.com/u/172399?v=3","gravatar_id":"","url":"https://api.github.com/users/egamma","html_url":"https://github.com/egamma","followers_url":"https://api.github.com/users/egamma/followers","following_url":"https://api.github.com/users/egamma/following{/other_user}","gists_url":"https://api.github.com/users/egamma/gists{/gist_id}","starred_url":"https://api.github.com/users/egamma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egamma/subscriptions","organizations_url":"https://api.github.com/users/egamma/orgs","repos_url":"https://api.github.com/users/egamma/repos","events_url":"https://api.github.com/users/egamma/events{/privacy}","received_events_url":"https://api.github.com/users/egamma/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2016-06-30T22:07:34Z","updated_at":"2016-07-16T20:24:08Z","closed_at":"2016-07-11T16:24:23Z","pull_request":{"url":"https://api.github.com/repos/Microsoft/vscode-go/pulls/370","html_url":"https://github.com/Microsoft/vscode-go/pull/370","diff_url":"https://github.com/Microsoft/vscode-go/pull/370.diff","patch_url":"https://github.com/Microsoft/vscode-go/pull/370.patch"},"body":"Related to a feature ask in #275 \r\nThis commit adds a command to the command palette that can be used to extract a method out of selected code and replace the selected code with a call to the extracted method using godoctor. Read more about godoctor at http://gorefactor.org/"},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode-go/issues/comments/233149281","html_url":"https://github.com/Microsoft/vscode-go/pull/370#issuecomment-233149281","issue_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/370","id":233149281,"user":{"login":"mattetti","id":113,"avatar_url":"https://avatars.githubusercontent.com/u/113?v=3","gravatar_id":"","url":"https://api.github.com/users/mattetti","html_url":"https://github.com/mattetti","followers_url":"https://api.github.com/users/mattetti/followers","following_url":"https://api.github.com/users/mattetti/following{/other_user}","gists_url":"https://api.github.com/users/mattetti/gists{/gist_id}","starred_url":"https://api.github.com/users/mattetti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattetti/subscriptions","organizations_url":"https://api.github.com/users/mattetti/orgs","repos_url":"https://api.github.com/users/mattetti/repos","events_url":"https://api.github.com/users/mattetti/events{/privacy}","received_events_url":"https://api.github.com/users/mattetti/received_events","type":"User","site_admin":false},"created_at":"2016-07-16T20:24:08Z","updated_at":"2016-07-16T20:24:08Z","body":"I talked with my friend Fatih who develops and maintains go-vim. He told me\nhe chose to not integrate this tool on purpose, apparently because it\ndoesn't seem to work quite right and he would have to  deal with support.\n\nI am excited about the opportunity of having a great refactoring/function\nextractor but I would suggest to wait until we have a more solid solution.\n\nOn Sat, Jul 16, 2016, 12:01 Luke Hoban <notifications@github.com> wrote:\n\n> I just had a chance to try out this feature. In the 4 projects I tried it\n> in, and half dozen locations trying to extract method in each, I didn't\n> actually find a single case where it worked :-).\n>\n> Are we sure that GoDoctor is robust enough for this integration, and if\n> so, that the integration is working sufficiently often that this feature is\n> a net win for the extension?\n>\n> Here are a few of the errors I saw during an Extract Method:\n>\n>    - Failed to parse the patches from godoctor: Illegal escape in\n>    patch_fromText: default:\n>    - Error: Completing the transformation will introduce the following\n>    error: <stdin>:59:2: no new variables on left side of :=\n>    - Error: could not import golang.org/x/net/http2/hpack (cannot find\n>    package \"golang.org/x/net/http2/hpack\" in any of:\n>    - Error: Code containing return statements may change behavior if it\n>    is extracted.\n>\n> I also agree with @mattetti <https://github.com/mattetti> that the last\n> of these makes this hard to use in practice in Go, since return statements\n> are so common in error checking interspersed through Go function bodies.\n>\n> Also, in most of the projects I tried, these changes appear to have broken\n> formatting with Cannot read property 'apply' of undefined. And\n> format-on-save, which is probably the most used feature of the extension,\n> doesn't appear to get triggered at all anymore (perhaps the error above is\n> causing that?).\n>\n> The issues with format will need to get fixed before we can push an\n> update for the extension, and I suspect it may be best to revert this\n> feature from master until it is more polished such that it works a\n> reasonable percent of the time that users try to use it.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/Microsoft/vscode-go/pull/370#issuecomment-233145671>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAAAcWVZ8XzCx-QiSFjf4b9vQZqtLTAhks5qWSqfgaJpZM4JCo2Y>\n> .\n>\n"}}
{"actor":{"display_login":"mattetti"}}