Skip to content

Instantly share code, notes, and snippets.

@aviaryan
Created April 22, 2017 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aviaryan/3e2ac784609e046441ee9ba9032baf17 to your computer and use it in GitHub Desktop.
Save aviaryan/3e2ac784609e046441ee9ba9032baf17 to your computer and use it in GitHub Desktop.
GoSublime User Settings
{
"env": {
"GOPATH": "$HOME/go",
"PATH": "$GOPATH/bin:$PATH"
},
// "fmt_cmd": ["goimports"],
// enable comp-lint, this will effectively disable the live linter
"comp_lint_enabled": true,
// list of commands to run
"comp_lint_commands": [
// run `golint` on all files in the package
// "shell":true is required in order to run the command through your shell (to expand `*.go`)
// also see: the documentation for the `shell` setting in the default settings file ctrl+dot,ctrl+4
{"cmd": ["golint *.go"], "shell": true},
// run go vet on the package
{"cmd": ["go", "vet"]},
// run `go install` on the package. GOBIN is set,
// so `main` packages shouldn't result in the installation of a binary
{"cmd": ["go", "install"]}
],
"on_save": [
// run comp-lint when you save,
// naturally, you can also bind this command `gs_comp_lint`
// to a key binding if you want
{"cmd": "gs_comp_lint"}
]
}
@mohitkyadav
Copy link

mohitkyadav commented Apr 23, 2017

You can add a comment before 2nd line

for windows users
"GOPATH": "C:/Go"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment