blob: a35936d2bca557b614d11aa1e43af379ed3c2c85 [file] [log] [blame] [view]
Jason Buberel93853272015-08-30 13:36:03 -07001An overview of tools that will help improve your Go code
2
Jason Buberel042985a2015-09-12 14:14:00 -07003## All-in-one
4
Pascal Vorwerk24224e72019-04-21 14:02:37 +02005 - [golangci-lint](https://github.com/golangci/golangci-lint) - Bundle of `gofmt`, `golint`, `govet` and many other tools that shares work between the different linters for better performance. Recommended by the original author to replace gometalinter (Drop-in replacement).
6 - DEPRECATED: [gometalinter](https://github.com/alecthomas/gometalinter) - Automates the installation, configuration and application of `gofmt`, `golint`, `govet` and several other code validation tools.
Jason Buberel042985a2015-09-12 14:14:00 -07007
Jason Buberel93853272015-08-30 13:36:03 -07008## Code Formatting
9
Jason Buberela3d46902015-09-13 08:41:30 -070010### Articles
11
12 - [Formatting Go Code with gofmt](http://golangtutorials.blogspot.com/2011/06/formatting-go-code-with-gofmt.html)
13
14### Tools
15
Jason Buberel93853272015-08-30 13:36:03 -070016 - [gofmt](https://golang.org/cmd/gofmt/) - Start with the standard Go code formatter
17 - [golint](https://github.com/golang/lint) - Detects style mistakes in Go code
xin zhaoc5ec1b82019-01-03 14:38:56 +080018 - [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) - Format code and fix your import statements
zy1b0587a2018-11-02 12:34:19 +080019 - [revive](https://github.com/mgechev/revive) - Fast, configurable, extensible, flexible, and beautiful linter for Go
Jason Buberel93853272015-08-30 13:36:03 -070020
Jason Buberel92cc5422015-09-12 15:18:39 -070021## Code generation, Templating and Generics
Jason Buberel8e66a022015-09-12 15:12:03 -070022
23 - [json-to-go](https://mholt.github.io/json-to-go/) - Generate Go structs from JSON.
24 - [Go gen](http://clipperhouse.github.io/gen/) - Type-driven code generation (generics)
25 - [gojson](https://github.com/ChimeraCoder/gojson) - Another Go struct generator.
Jason Buberel92cc5422015-09-12 15:18:39 -070026 - [gotemplate](https://github.com/ncw/gotemplate) - Package-based templating system for Go
Jason Buberelc549bf62015-09-13 08:22:07 -070027 - [sqlgen](https://github.com/drone/sqlgen) - Generate Go code for SQL interactions.
Martin Czygane6eb99c2018-11-04 13:36:39 +010028 - [zek](https://github.com/miku/zek) - Generate Go struct from XML.
Jason Buberel8e66a022015-09-12 15:12:03 -070029
Jason Buberel93853272015-08-30 13:36:03 -070030## Refactoring
Jason Buberela3d46902015-09-13 08:41:30 -070031
32### Articles
33
Jason Buberel93853272015-08-30 13:36:03 -070034 - [Refactoring with go fmt](http://spf13.com/post/go-fmt/)
35 - [gorename - easy refactoring](https://texlution.com/post/gorename/)
Kate Fitzpatrickeb94b9c2018-10-30 09:41:52 -070036 - [Refactoring Tools](http://blog.ralch.com/tutorial/golang-tools-refactoring/) - An overview of refactoring tools for Go.
Jason Bubereldafb9342015-09-27 14:03:12 -070037 - [Quick renaming with gofmt](http://technosophos.com/2015/09/26/quick-go-hack-renaming-structs.html)
Jason Buberela3d46902015-09-13 08:41:30 -070038
39### Tools
40
41- [eg](https://godoc.org/golang.org/x/tools/cmd/eg) - Example-based refactoring tool for Go
42- [gofmt](https://golang.org/cmd/gofmt/) - Start with the standard Go code formatter
43- [gorename](https://golang.org/x/tools/refactor/rename) - Renaming tool for Go
Jason Buberel93853272015-08-30 13:36:03 -070044
45## Error Detection
46
Jason Buberela3d46902015-09-13 08:41:30 -070047### Articles
48
49 - [Go Inspection Tools](http://blog.ralch.com/tutorial/golang-tools-inspection/) - An overview of tools for Go code inspection.
Jason Bubereldafb9342015-09-27 14:03:12 -070050
Jason Buberela3d46902015-09-13 08:41:30 -070051### Tools
52
Auke Willem Oosterhoffca307322016-10-17 09:33:48 +020053 - [AlignCheck, StructCheck, VarCheck](https://github.com/opennota/check/) - A suite of tools for checking your code.
Jason Buberela3d46902015-09-13 08:41:30 -070054 - [errcheck](https://github.com/kisielk/errcheck) - Ensure you check your error conditions.
Jason Buberel93853272015-08-30 13:36:03 -070055 - [go vet](http://golang.org/cmd/vet/) - Read this first on how to use the `go vet` command.
Jason Buberela3d46902015-09-13 08:41:30 -070056 - [SafeSQL](https://github.com/stripe/safesql) - Protect against unsafe SQL in your code.
Jason Buberel93853272015-08-30 13:36:03 -070057
58## Navigation
59
Shai Coleman11eafc62018-10-28 23:40:33 +000060 - [Go Guru - User Manual](https://golang.org/s/using-guru) - A tool for understanding Go code.
61 - [Pythia](https://github.com/fzipp/pythia) - A browser-based UI for Go Guru.
Jason Buberel042985a2015-09-12 14:14:00 -070062
63## Visualization
64
Karol Marcjanf533d0e2015-09-19 15:53:15 +020065 - [godegraph](http://github.com/kisielk/godepgraph) - A tool for generating dependency graphs of Go code.