Created
April 6, 2017 00:41
-
-
Save mattmc3/280892fd68f9d8630d9c0b08b8de6b37 to your computer and use it in GitHub Desktop.
VSCode tasks for Golang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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": "${workspaceRoot}", | |
"env": { | |
"GOPATH": "${workspaceRoot}/../.." | |
} | |
}, | |
"tasks": [ | |
{ | |
"taskName": "run", | |
"args": ["${workspaceRoot}/main.go"], | |
"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
tkx!