{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vscode-go/pulls/comments/236019467","pull_request_review_id":178025615,"id":236019467,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjAxOTQ2Nw==","diff_hunk":"@@ -0,0 +1,95 @@\n+/*---------------------------------------------------------\n+ * Copyright (C) Microsoft Corporation. All rights reserved.\n+ * Licensed under the MIT License. See License.txt in the project root for license information.\n+ *--------------------------------------------------------*/\n+\n+'use strict';\n+\n+import vscode = require('vscode');\n+import cp = require('child_process');\n+import path = require('path');\n+import { byteOffsetAt, getBinPath, canonicalizeGOPATHPrefix, getFileArchive, killTree } from './util';\n+import { promptForMissingTool, promptForUpdatingTool } from './goInstallTools';\n+import { getToolsEnvVars } from './util';\n+\n+interface GuruDescribeOutput {\n+\tdesc: string;\n+\tpos: string;\n+\tdetail: string;\n+\tvalue: GuruDescribeValueOutput;\n+}\n+\n+interface GuruDescribeValueOutput {\n+\ttype: string;\n+\tvalue: string;\n+\tobjpos: string;\n+\ttypespos: GuruDefinitionOutput[];\n+}\n+\n+interface GuruDefinitionOutput {\n+\tobjpos: string;\n+\tdesc: string;\n+}\n+\n+export class GoTypeDefinitionProvider implements vscode.TypeDefinitionProvider {\n+\tprovideTypeDefinition(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): vscode.ProviderResult<vscode.Definition> {\n+\t\treturn new Promise<vscode.Location[]>((resolve, reject) => {\n+\t\t\tlet goGuru = getBinPath('guru');\n+\t\t\tif (!path.isAbsolute(goGuru)) {\n+\t\t\t\tpromptForMissingTool('guru');\n+\t\t\t\treturn reject('Cannot find tool \"guru\" to find type definitions.');\n+\t\t\t}\n+\n+\t\t\tlet filename = canonicalizeGOPATHPrefix(document.fileName);\n+\t\t\tlet offset = byteOffsetAt(document, position);\n+\t\t\tlet env = getToolsEnvVars();\n+\t\t\tlet buildTags = vscode.workspace.getConfiguration('go', document.uri)['buildTags'];\n+\t\t\tlet args = buildTags ? ['-tags', buildTags] : [];\n+\t\t\targs.push('-json', '-modified', 'describe', `${filename}:#${offset.toString()}`);\n+\n+\t\t\tlet process = cp.execFile(goGuru, args, { env }, (err, stdout, stderr) => {","path":"src/goTypeDefinition.ts","position":50,"original_position":50,"commit_id":"7dabda92a99e037a6e5247daed60d777b3f55c27","original_commit_id":"7dabda92a99e037a6e5247daed60d777b3f55c27","user":{"login":"hummerd","id":1921665,"node_id":"MDQ6VXNlcjE5MjE2NjU=","avatar_url":"https://avatars2.githubusercontent.com/u/1921665?v=4","gravatar_id":"","url":"https://api.github.com/users/hummerd","html_url":"https://github.com/hummerd","followers_url":"https://api.github.com/users/hummerd/followers","following_url":"https://api.github.com/users/hummerd/following{/other_user}","gists_url":"https://api.github.com/users/hummerd/gists{/gist_id}","starred_url":"https://api.github.com/users/hummerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hummerd/subscriptions","organizations_url":"https://api.github.com/users/hummerd/orgs","repos_url":"https://api.github.com/users/hummerd/repos","events_url":"https://api.github.com/users/hummerd/events{/privacy}","received_events_url":"https://api.github.com/users/hummerd/received_events","type":"User","site_admin":false},"body":"@ramya-rao-a I can try it on some big project from github and show measurements result. Should I?","created_at":"2018-11-23T21:19:26Z","updated_at":"2018-11-23T21:19:26Z","html_url":"https://github.com/Microsoft/vscode-go/pull/2136#discussion_r236019467","pull_request_url":"https://api.github.com/repos/Microsoft/vscode-go/pulls/2136","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-go/pulls/comments/236019467"},"html":{"href":"https://github.com/Microsoft/vscode-go/pull/2136#discussion_r236019467"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vscode-go/pulls/2136"}},"in_reply_to_id":235588145},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vscode-go/pulls/2136","id":232468720,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyNDY4NzIw","html_url":"https://github.com/Microsoft/vscode-go/pull/2136","diff_url":"https://github.com/Microsoft/vscode-go/pull/2136.diff","patch_url":"https://github.com/Microsoft/vscode-go/pull/2136.patch","issue_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/2136","number":2136,"state":"open","locked":false,"title":"Go to Type Definition command implementation","user":{"login":"hummerd","id":1921665,"node_id":"MDQ6VXNlcjE5MjE2NjU=","avatar_url":"https://avatars2.githubusercontent.com/u/1921665?v=4","gravatar_id":"","url":"https://api.github.com/users/hummerd","html_url":"https://github.com/hummerd","followers_url":"https://api.github.com/users/hummerd/followers","following_url":"https://api.github.com/users/hummerd/following{/other_user}","gists_url":"https://api.github.com/users/hummerd/gists{/gist_id}","starred_url":"https://api.github.com/users/hummerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hummerd/subscriptions","organizations_url":"https://api.github.com/users/hummerd/orgs","repos_url":"https://api.github.com/users/hummerd/repos","events_url":"https://api.github.com/users/hummerd/events{/privacy}","received_events_url":"https://api.github.com/users/hummerd/received_events","type":"User","site_admin":false},"body":"Go to Type Definition command implementation. Works with latest guru [with this commit](https://github.com/golang/tools/commit/9c8bd463e3aca40b6288cd14f7b7703206ff743b).\r\n\r\n\r\n","created_at":"2018-11-20T21:44:03Z","updated_at":"2018-11-23T21:19:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5307f78c2107e9acc584dfffbd953ef7687d0c3a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vscode-go/pulls/2136/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vscode-go/pulls/2136/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vscode-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/2136/comments","statuses_url":"https://api.github.com/repos/Microsoft/vscode-go/statuses/7dabda92a99e037a6e5247daed60d777b3f55c27","head":{"label":"hummerd:master","ref":"master","sha":"7dabda92a99e037a6e5247daed60d777b3f55c27","user":{"login":"hummerd","id":1921665,"node_id":"MDQ6VXNlcjE5MjE2NjU=","avatar_url":"https://avatars2.githubusercontent.com/u/1921665?v=4","gravatar_id":"","url":"https://api.github.com/users/hummerd","html_url":"https://github.com/hummerd","followers_url":"https://api.github.com/users/hummerd/followers","following_url":"https://api.github.com/users/hummerd/following{/other_user}","gists_url":"https://api.github.com/users/hummerd/gists{/gist_id}","starred_url":"https://api.github.com/users/hummerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hummerd/subscriptions","organizations_url":"https://api.github.com/users/hummerd/orgs","repos_url":"https://api.github.com/users/hummerd/repos","events_url":"https://api.github.com/users/hummerd/events{/privacy}","received_events_url":"https://api.github.com/users/hummerd/received_events","type":"User","site_admin":false},"repo":{"id":101397916,"node_id":"MDEwOlJlcG9zaXRvcnkxMDEzOTc5MTY=","name":"vscode-go","full_name":"hummerd/vscode-go","private":false,"owner":{"login":"hummerd","id":1921665,"node_id":"MDQ6VXNlcjE5MjE2NjU=","avatar_url":"https://avatars2.githubusercontent.com/u/1921665?v=4","gravatar_id":"","url":"https://api.github.com/users/hummerd","html_url":"https://github.com/hummerd","followers_url":"https://api.github.com/users/hummerd/followers","following_url":"https://api.github.com/users/hummerd/following{/other_user}","gists_url":"https://api.github.com/users/hummerd/gists{/gist_id}","starred_url":"https://api.github.com/users/hummerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hummerd/subscriptions","organizations_url":"https://api.github.com/users/hummerd/orgs","repos_url":"https://api.github.com/users/hummerd/repos","events_url":"https://api.github.com/users/hummerd/events{/privacy}","received_events_url":"https://api.github.com/users/hummerd/received_events","type":"User","site_admin":false},"html_url":"https://github.com/hummerd/vscode-go","description":"An extension for VS Code which provides support for the Go language.","fork":true,"url":"https://api.github.com/repos/hummerd/vscode-go","forks_url":"https://api.github.com/repos/hummerd/vscode-go/forks","keys_url":"https://api.github.com/repos/hummerd/vscode-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hummerd/vscode-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hummerd/vscode-go/teams","hooks_url":"https://api.github.com/repos/hummerd/vscode-go/hooks","issue_events_url":"https://api.github.com/repos/hummerd/vscode-go/issues/events{/number}","events_url":"https://api.github.com/repos/hummerd/vscode-go/events","assignees_url":"https://api.github.com/repos/hummerd/vscode-go/assignees{/user}","branches_url":"https://api.github.com/repos/hummerd/vscode-go/branches{/branch}","tags_url":"https://api.github.com/repos/hummerd/vscode-go/tags","blobs_url":"https://api.github.com/repos/hummerd/vscode-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hummerd/vscode-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hummerd/vscode-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/hummerd/vscode-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hummerd/vscode-go/statuses/{sha}","languages_url":"https://api.github.com/repos/hummerd/vscode-go/languages","stargazers_url":"https://api.github.com/repos/hummerd/vscode-go/stargazers","contributors_url":"https://api.github.com/repos/hummerd/vscode-go/contributors","subscribers_url":"https://api.github.com/repos/hummerd/vscode-go/subscribers","subscription_url":"https://api.github.com/repos/hummerd/vscode-go/subscription","commits_url":"https://api.github.com/repos/hummerd/vscode-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/hummerd/vscode-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/hummerd/vscode-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/hummerd/vscode-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/hummerd/vscode-go/contents/{+path}","compare_url":"https://api.github.com/repos/hummerd/vscode-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hummerd/vscode-go/merges","archive_url":"https://api.github.com/repos/hummerd/vscode-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hummerd/vscode-go/downloads","issues_url":"https://api.github.com/repos/hummerd/vscode-go/issues{/number}","pulls_url":"https://api.github.com/repos/hummerd/vscode-go/pulls{/number}","milestones_url":"https://api.github.com/repos/hummerd/vscode-go/milestones{/number}","notifications_url":"https://api.github.com/repos/hummerd/vscode-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hummerd/vscode-go/labels{/name}","releases_url":"https://api.github.com/repos/hummerd/vscode-go/releases{/id}","deployments_url":"https://api.github.com/repos/hummerd/vscode-go/deployments","created_at":"2017-08-25T11:34:23Z","updated_at":"2018-11-21T20:34:40Z","pushed_at":"2018-11-21T20:34:37Z","git_url":"git://github.com/hummerd/vscode-go.git","ssh_url":"git@github.com:hummerd/vscode-go.git","clone_url":"https://github.com/hummerd/vscode-go.git","svn_url":"https://github.com/hummerd/vscode-go","homepage":"https://marketplace.visualstudio.com/items/lukehoban.Go","size":89188,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"b04fe03d5f24287424965e961c15f93ce69a1a2e","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":44264925,"node_id":"MDEwOlJlcG9zaXRvcnk0NDI2NDkyNQ==","name":"vscode-go","full_name":"Microsoft/vscode-go","private":false,"owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Microsoft/vscode-go","description":"An extension for VS Code which provides support for the Go language.","fork":false,"url":"https://api.github.com/repos/Microsoft/vscode-go","forks_url":"https://api.github.com/repos/Microsoft/vscode-go/forks","keys_url":"https://api.github.com/repos/Microsoft/vscode-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vscode-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vscode-go/teams","hooks_url":"https://api.github.com/repos/Microsoft/vscode-go/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vscode-go/events","assignees_url":"https://api.github.com/repos/Microsoft/vscode-go/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vscode-go/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vscode-go/tags","blobs_url":"https://api.github.com/repos/Microsoft/vscode-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vscode-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vscode-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vscode-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vscode-go/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vscode-go/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vscode-go/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vscode-go/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vscode-go/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vscode-go/subscription","commits_url":"https://api.github.com/repos/Microsoft/vscode-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vscode-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vscode-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vscode-go/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vscode-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vscode-go/merges","archive_url":"https://api.github.com/repos/Microsoft/vscode-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vscode-go/downloads","issues_url":"https://api.github.com/repos/Microsoft/vscode-go/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vscode-go/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vscode-go/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vscode-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vscode-go/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vscode-go/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vscode-go/deployments","created_at":"2015-10-14T17:34:10Z","updated_at":"2018-11-23T14:30:28Z","pushed_at":"2018-11-22T17:46:13Z","git_url":"git://github.com/Microsoft/vscode-go.git","ssh_url":"git@github.com:Microsoft/vscode-go.git","clone_url":"https://github.com/Microsoft/vscode-go.git","svn_url":"https://github.com/Microsoft/vscode-go","homepage":"https://marketplace.visualstudio.com/items/lukehoban.Go","size":91895,"stargazers_count":4203,"watchers_count":4203,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":505,"mirror_url":null,"archived":false,"open_issues_count":184,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":505,"open_issues":184,"watchers":4203,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-go/pulls/2136"},"html":{"href":"https://github.com/Microsoft/vscode-go/pull/2136"},"issue":{"href":"https://api.github.com/repos/Microsoft/vscode-go/issues/2136"},"comments":{"href":"https://api.github.com/repos/Microsoft/vscode-go/issues/2136/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vscode-go/pulls/2136/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vscode-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vscode-go/pulls/2136/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vscode-go/statuses/7dabda92a99e037a6e5247daed60d777b3f55c27"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"hummerd"}}