Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Include the link to release note/package overview in the update promp…
Browse files Browse the repository at this point in the history
…t, and update gopls default version (#3041)
  • Loading branch information
hyangah authored Mar 16, 2020
1 parent 5dc0357 commit 6d1bf5c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/goInstallTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,18 @@ export async function promptForUpdatingTool(toolName: string) {
}
const goVersion = await getGoVersion();
const updateMsg = `Your version of ${tool.name} appears to be out of date. Please update for an improved experience.`;
vscode.window.showInformationMessage(updateMsg, 'Update').then((selected) => {
const choices: string[] = ['Update'];
if (toolName === `gopls`) {
choices.push('Release Notes'); // TODO(hyangah): pass more info such as version, release note location.
}
vscode.window.showInformationMessage(updateMsg, ...choices).then((selected) => {
switch (selected) {
case 'Update':
installTools([tool], goVersion);
break;
case 'Release Notes':
vscode.commands.executeCommand('vscode.open', vscode.Uri.parse('https://github.com/golang/go/issues/33030#issuecomment-510151934'));
break;
default:
declinedUpdates.push(tool);
break;
Expand Down

0 comments on commit 6d1bf5c

Please sign in to comment.