Skip to content

Instantly share code, notes, and snippets.

@mpolyak
Last active November 18, 2022 16:26
Show Gist options
  • Save mpolyak/8aa153fae4c6409fb0e8bf8c67a864b8 to your computer and use it in GitHub Desktop.
Save mpolyak/8aa153fae4c6409fb0e8bf8c67a864b8 to your computer and use it in GitHub Desktop.
Sublime Text build system files for running Go tests
{
"shell_cmd": "go test -v -run \\$(cat $file_name | sed -n 's/func \\(Test.*\\)(.*/\\1/p' | xargs | sed 's/ /|/g')",
"file_regex": "^\\s*(.+\\.go):([0-9]+)",
"file_patterns": ["*_test.go"],
}
{
"cmd": ["go", "test", "./..."],
"file_regex": "^\\s*(.+\\.go):([0-9]+)",
"selector": "source.go"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment