Skip to content

Instantly share code, notes, and snippets.

@blzjns
Created March 24, 2016 14:12
Show Gist options
  • Save blzjns/8ec43cb5086a012ef9c9 to your computer and use it in GitHub Desktop.
Save blzjns/8ec43cb5086a012ef9c9 to your computer and use it in GitHub Desktop.
vscode (Visual Studio Code) task for go lang
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${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 current working directory of the spawned process
{
"version": "0.1.0",
"command": "go", //or absolute path: /usr/local/go/bin/go
"options": {
"cwd": "${fileDirname}",
"env": {
//"GOPATH": "/Users/gocode"
}
},
"isShellCommand": true,
"showOutput": "always", //silent
"echoCommand": true,
"tasks": [
{
"taskName": "build"
},
{
"taskName": "install",
"isBuildCommand": true
},
{
"taskName": "test",
"isTestCommand": true
},
{
"taskName": "run",
"args": [
"${file}"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment