github.com/mailgun/holster/v4@v4.20.0/CONTRIBUTING.md (about) 1 # Contributing to holster 2 3 ## Go version 4 Use the same version as in the [go.mod](https://github.com/mailgun/holster/blob/master/go.mod#L3) file. 5 6 ## go.mod and go.sum 7 `go mod tidy` should be called before commit to add missing and remove unused modules. 8 9 ## Formatting 10 Prior to commit all code should be formatted by the [goimports](https://pkg.go.dev/golang.org/x/tools/cmd/goimports) tool. 11 12 ### How to configure IDEs 13 #### GoLand 14 Go to Preferences → Editor → Code style → Go → Imports → Sorting, choose "goimports". 15 16 #### VSCode 17 1. Call `go install golang.org/x/tools/cmd/goimports@latest`. 18 1. Install Golang extension. 19 1. Go to Settings → Extensions → Format tool, choose "goimports". 20 21 #### Emacs, Vim, GoSublime, etc. 22 See [goimports doc](https://pkg.go.dev/golang.org/x/tools/cmd/goimports?tab=doc). 23 24 ## Linters 25 We are using [golangci-lint](https://golangci-lint.run/) for static code analysis. 26 27 In case of `Lint / lint` GitHub Action failure check the annotations on the PR’s `Files changed` tab. 28 29 You could also run `make lint` on your local env to check it.