Skip to content

Commit

Permalink
✅ creates Go: Benchmark Package function (microsoft#1522)
Browse files Browse the repository at this point in the history
  • Loading branch information
biancarosa committed Aug 30, 2018
1 parent 292b29d commit 81289b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@
"title": "Go: Test Package",
"description": "Runs all unit tests in the package of the current file."
},
{
"command": "go.benchmark.package",
"title": "Go: Benchmark Package",
"description": "Runs all unit tests in the package of the current file."
},
{
"command": "go.test.workspace",
"title": "Go: Test All Packages In Workspace",
Expand Down
7 changes: 7 additions & 0 deletions src/goMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,13 @@ export function activate(ctx: vscode.ExtensionContext): void {

ctx.subscriptions.push(vscode.commands.registerCommand('go.test.package', (args) => {
let goConfig = vscode.workspace.getConfiguration('go', vscode.window.activeTextEditor ? vscode.window.activeTextEditor.document.uri : null);
let isBenchmark = false;
testCurrentPackage(goConfig, args);
}));

ctx.subscriptions.push(vscode.commands.registerCommand('go.benchmark.package', (args) => {
let goConfig = vscode.workspace.getConfiguration('go', vscode.window.activeTextEditor ? vscode.window.activeTextEditor.document.uri : null);
let isBenchmark = true;
testCurrentPackage(goConfig, args);
}));

Expand Down

0 comments on commit 81289b2

Please sign in to comment.