Skip to content

Instantly share code, notes, and snippets.

@ycliu912
Created September 9, 2019 02:48
Show Gist options
  • Save ycliu912/4734f6d27e6a1017437f4bfb8a285cc0 to your computer and use it in GitHub Desktop.
Save ycliu912/4734f6d27e6a1017437f4bfb8a285cc0 to your computer and use it in GitHub Desktop.
vscode-tasks.json
// See http://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
// ${workspaceRoot} the path of the folder opened in VS Code
// ${file} the current opened file
// ${fileBasename} the current opened file's basename
// ${fileDirname} the current opened file's dirname
// ${fileExtname} the current opened file's extension
// ${cwd} the task runner's current working directory on startup
{
"version": "0.1.0",
"command": "go",
"isShellCommand": true,
"showOutput": "always",
"echoCommand": true,
"options": {
"cwd": "${fileDirname}",
"env": {
"GOPATH": "${workspaceRoot}/../.."
}
},
"tasks": [
{
"taskName": "run",
"args": ["${file}"],
"isBuildCommand": true
},
{
"taskName": "build",
"args": ["-v", "./..."]
},
{
"taskName": "test",
"args": ["-v", "./..."],
"isTestCommand": true
},
{
"taskName": "integration_tests",
"suppressTaskName": true,
"args": ["test", "-v", "./...", "-tags=integration"]
},
{
"taskName": "benchmark",
"suppressTaskName": true,
"args": ["test", "-bench=.", "-v", "./..."]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment