Jason Buberel | 9385327 | 2015-08-30 13:36:03 -0700 | [diff] [blame] | 1 | An overview of tools that will help improve your Go code |
| 2 | |
Jason Buberel | 042985a | 2015-09-12 14:14:00 -0700 | [diff] [blame] | 3 | ## All-in-one |
| 4 | |
Jason Buberel | 75a9fb1 | 2015-09-12 15:24:14 -0700 | [diff] [blame] | 5 | - [gometalinter](https://github.com/alecthomas/gometalinter) - Automates the installation, configuration and application of `gofmt`, `golint`, `govet` and several other code validation tools. |
Jason Buberel | 042985a | 2015-09-12 14:14:00 -0700 | [diff] [blame] | 6 | |
Jason Buberel | 9385327 | 2015-08-30 13:36:03 -0700 | [diff] [blame] | 7 | ## Code Formatting |
| 8 | |
Jason Buberel | a3d4690 | 2015-09-13 08:41:30 -0700 | [diff] [blame] | 9 | ### Articles |
| 10 | |
| 11 | - [Formatting Go Code with gofmt](http://golangtutorials.blogspot.com/2011/06/formatting-go-code-with-gofmt.html) |
| 12 | |
| 13 | ### Tools |
| 14 | |
Jason Buberel | 9385327 | 2015-08-30 13:36:03 -0700 | [diff] [blame] | 15 | - [gofmt](https://golang.org/cmd/gofmt/) - Start with the standard Go code formatter |
| 16 | - [golint](https://github.com/golang/lint) - Detects style mistakes in Go code |
| 17 | - [goimports](https://github.com/bradfitz/goimports) - Format code and fix your import statements |
Jason Buberel | 9385327 | 2015-08-30 13:36:03 -0700 | [diff] [blame] | 18 | |
Jason Buberel | 92cc542 | 2015-09-12 15:18:39 -0700 | [diff] [blame] | 19 | ## Code generation, Templating and Generics |
Jason Buberel | 8e66a02 | 2015-09-12 15:12:03 -0700 | [diff] [blame] | 20 | |
| 21 | - [json-to-go](https://mholt.github.io/json-to-go/) - Generate Go structs from JSON. |
| 22 | - [Go gen](http://clipperhouse.github.io/gen/) - Type-driven code generation (generics) |
| 23 | - [gojson](https://github.com/ChimeraCoder/gojson) - Another Go struct generator. |
Jason Buberel | 92cc542 | 2015-09-12 15:18:39 -0700 | [diff] [blame] | 24 | - [gonerics.io](http://bouk.co/blog/idiomatic-generics-in-go/) - Idiomatic Generics in Go |
| 25 | - [gotemplate](https://github.com/ncw/gotemplate) - Package-based templating system for Go |
Jason Buberel | c549bf6 | 2015-09-13 08:22:07 -0700 | [diff] [blame] | 26 | - [sqlgen](https://github.com/drone/sqlgen) - Generate Go code for SQL interactions. |
Jason Buberel | 8e66a02 | 2015-09-12 15:12:03 -0700 | [diff] [blame] | 27 | |
Jason Buberel | 9385327 | 2015-08-30 13:36:03 -0700 | [diff] [blame] | 28 | ## Refactoring |
Jason Buberel | a3d4690 | 2015-09-13 08:41:30 -0700 | [diff] [blame] | 29 | |
| 30 | ### Articles |
| 31 | |
Jason Buberel | 9385327 | 2015-08-30 13:36:03 -0700 | [diff] [blame] | 32 | - [Refactoring with go fmt](http://spf13.com/post/go-fmt/) |
| 33 | - [gorename - easy refactoring](https://texlution.com/post/gorename/) |
Jason Buberel | a3d4690 | 2015-09-13 08:41:30 -0700 | [diff] [blame] | 34 | - [Refectoring Tools](http://blog.ralch.com/tutorial/golang-tools-refactoring/) - An overview of refactoring tools for Go. |
Jason Buberel | dafb934 | 2015-09-27 14:03:12 -0700 | [diff] [blame] | 35 | - [Quick renaming with gofmt](http://technosophos.com/2015/09/26/quick-go-hack-renaming-structs.html) |
Jason Buberel | a3d4690 | 2015-09-13 08:41:30 -0700 | [diff] [blame] | 36 | |
| 37 | ### Tools |
| 38 | |
| 39 | - [eg](https://godoc.org/golang.org/x/tools/cmd/eg) - Example-based refactoring tool for Go |
| 40 | - [gofmt](https://golang.org/cmd/gofmt/) - Start with the standard Go code formatter |
| 41 | - [gorename](https://golang.org/x/tools/refactor/rename) - Renaming tool for Go |
Jason Buberel | 9385327 | 2015-08-30 13:36:03 -0700 | [diff] [blame] | 42 | |
| 43 | ## Error Detection |
| 44 | |
Jason Buberel | a3d4690 | 2015-09-13 08:41:30 -0700 | [diff] [blame] | 45 | ### Articles |
| 46 | |
| 47 | - [Go Inspection Tools](http://blog.ralch.com/tutorial/golang-tools-inspection/) - An overview of tools for Go code inspection. |
Jason Buberel | dafb934 | 2015-09-27 14:03:12 -0700 | [diff] [blame] | 48 | |
Jason Buberel | a3d4690 | 2015-09-13 08:41:30 -0700 | [diff] [blame] | 49 | ### Tools |
| 50 | |
Auke Willem Oosterhoff | ca30732 | 2016-10-17 09:33:48 +0200 | [diff] [blame] | 51 | - [AlignCheck, StructCheck, VarCheck](https://github.com/opennota/check/) - A suite of tools for checking your code. |
Jason Buberel | a3d4690 | 2015-09-13 08:41:30 -0700 | [diff] [blame] | 52 | - [errcheck](https://github.com/kisielk/errcheck) - Ensure you check your error conditions. |
Jason Buberel | 9385327 | 2015-08-30 13:36:03 -0700 | [diff] [blame] | 53 | - [go vet](http://golang.org/cmd/vet/) - Read this first on how to use the `go vet` command. |
Jason Buberel | a3d4690 | 2015-09-13 08:41:30 -0700 | [diff] [blame] | 54 | - [SafeSQL](https://github.com/stripe/safesql) - Protect against unsafe SQL in your code. |
| 55 | - |
Jason Buberel | 9385327 | 2015-08-30 13:36:03 -0700 | [diff] [blame] | 56 | |
| 57 | ## Navigation |
| 58 | |
| 59 | - [go oracle - user manual](http://golang.org/s/oracle-user-manual) - A tool for understanding Go code |
Jason Buberel | 042985a | 2015-09-12 14:14:00 -0700 | [diff] [blame] | 60 | - [Pythia](https://github.com/fzipp/pythia) - A browser-based UI for the Go Oracle. |
| 61 | |
| 62 | ## Visualization |
| 63 | |
Karol Marcjan | f533d0e | 2015-09-19 15:53:15 +0200 | [diff] [blame] | 64 | - [godegraph](http://github.com/kisielk/godepgraph) - A tool for generating dependency graphs of Go code. |