blob: 6ce49ae640496b791e79b16c07497669e3f23856 [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 - [gonerics.io](http://bouk.co/blog/idiomatic-generics-in-go/) - Idiomatic Generics in Go
27 - [gotemplate](https://github.com/ncw/gotemplate) - Package-based templating system for Go
Jason Buberelc549bf62015-09-13 08:22:07 -070028 - [sqlgen](https://github.com/drone/sqlgen) - Generate Go code for SQL interactions.
Martin Czygane6eb99c2018-11-04 13:36:39 +010029 - [zek](https://github.com/miku/zek) - Generate Go struct from XML.
Jason Buberel8e66a022015-09-12 15:12:03 -070030
Jason Buberel93853272015-08-30 13:36:03 -070031## Refactoring
Jason Buberela3d46902015-09-13 08:41:30 -070032
33### Articles
34
Jason Buberel93853272015-08-30 13:36:03 -070035 - [Refactoring with go fmt](http://spf13.com/post/go-fmt/)
36 - [gorename - easy refactoring](https://texlution.com/post/gorename/)
Kate Fitzpatrickeb94b9c2018-10-30 09:41:52 -070037 - [Refactoring Tools](http://blog.ralch.com/tutorial/golang-tools-refactoring/) - An overview of refactoring tools for Go.
Jason Bubereldafb9342015-09-27 14:03:12 -070038 - [Quick renaming with gofmt](http://technosophos.com/2015/09/26/quick-go-hack-renaming-structs.html)
Jason Buberela3d46902015-09-13 08:41:30 -070039
40### Tools
41
42- [eg](https://godoc.org/golang.org/x/tools/cmd/eg) - Example-based refactoring tool for Go
43- [gofmt](https://golang.org/cmd/gofmt/) - Start with the standard Go code formatter
44- [gorename](https://golang.org/x/tools/refactor/rename) - Renaming tool for Go
Jason Buberel93853272015-08-30 13:36:03 -070045
46## Error Detection
47
Jason Buberela3d46902015-09-13 08:41:30 -070048### Articles
49
50 - [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 -070051
Jason Buberela3d46902015-09-13 08:41:30 -070052### Tools
53
Auke Willem Oosterhoffca307322016-10-17 09:33:48 +020054 - [AlignCheck, StructCheck, VarCheck](https://github.com/opennota/check/) - A suite of tools for checking your code.
Jason Buberela3d46902015-09-13 08:41:30 -070055 - [errcheck](https://github.com/kisielk/errcheck) - Ensure you check your error conditions.
Jason Buberel93853272015-08-30 13:36:03 -070056 - [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 -070057 - [SafeSQL](https://github.com/stripe/safesql) - Protect against unsafe SQL in your code.
Jason Buberel93853272015-08-30 13:36:03 -070058
59## Navigation
60
Shai Coleman11eafc62018-10-28 23:40:33 +000061 - [Go Guru - User Manual](https://golang.org/s/using-guru) - A tool for understanding Go code.
62 - [Pythia](https://github.com/fzipp/pythia) - A browser-based UI for Go Guru.
Jason Buberel042985a2015-09-12 14:14:00 -070063
64## Visualization
65
Karol Marcjanf533d0e2015-09-19 15:53:15 +020066 - [godegraph](http://github.com/kisielk/godepgraph) - A tool for generating dependency graphs of Go code.