Skip to content

Instantly share code, notes, and snippets.

@mattetti
Created April 7, 2016 22:20
Show Gist options
  • Save mattetti/bd27d1ce27dc10d44c0456a15570aa69 to your computer and use it in GitHub Desktop.
Save mattetti/bd27d1ce27dc10d44c0456a15570aa69 to your computer and use it in GitHub Desktop.
VSCode custom settings - nothing fancy really
"test case": {
"prefix": "test",
"body": [
"func Test_$1(t *testing.T) {",
" testCases := []struct {",
" input string",
" output string",
" }{",
" {\"\",\"\"},",
" }",
"",
" for i, tc := range testCases {",
" t.Logf(\"test case %d\\n\", i)",
" if o := $1(tc.input); o != tc.output {",
" t.Fatalf(\"expected %s\\ngot\\n%s\\n\", tc.output, o)",
" }",
" }",
"}"
],
"description": "Create basic test suite case"
}
}
[
{
"key": "ctrl+]",
"command": "editor.action.goToDeclaration",
"when": "editorTextFocus"
},
{
"key": "ctrl+[",
"command": "workbench.action.navigateBack"
},
{
"key": "ctrl+o",
"command": "workbench.action.navigateBack"
},
{
"key": "cmd+5",
"command": "editor.action.jumpToBracket",
"when": "editorTextFocus"
},
{
"key": "cmd+r",
"command": "go.test.package"
},
{
"key": "cmd+shift+i",
"command": "go.import.add"
}
]
{
"telemetry.enableCrashReporter": false,
"telemetry.enableTelemetry": false,
"go.formatOnSave": true,
"go.buildOnSave": true,
"go.lintOnSave": true,
"go.vetOnSave": true,
"go.buildFlags": [],
"go.lintFlags": [],
"go.vetFlags": [],
"go.useCodeSnippetsOnFunctionSuggest": false,
"go.formatTool": "goreturns",
"editor.tabSize": "auto",
"editor.formatOnType": true,
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/dist/public": true,
"**/tmp": true,
"**/tags": true,
"**/public/dist": true
},
"files.trimTrailingWhitespace": true,
"editor.fontFamily": "Fira Code",
"editor.fontSize": 14,
"editor.fontLigatures": true
}
{
"version": "0.1.0",
"command": "go",
"isShellCommand": true,
"showOutput": "always",
"tasks": [
{
"taskName": "build",
"args": [ "-v", "./..."],
"isBuildCommand": true
},
{
"taskName": "test",
"args": [ "-v", "./..."],
"isTestCommand": true
},
{
"taskName": "run",
"args": ["main.go"],
"isBuildCommand": false
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment