title: CodeTools
An overview of tools that will help improve your Go code
All-in-one
- golangci-lint - Fast linters runners for Go. Bundle of
gofmt
, govet
, errcheck
, staticcheck
, revive
and many other linters. Recommended by the original author to replace gometalinter (Drop-in replacement). - DEPRECATED: gometalinter - Automates the installation, configuration and application of
gofmt
, golint
, govet
and several other code validation tools.
Code Formatting
Articles
Tools
- air - Live reload for Go apps.
- gofmt - Start with the standard Go code formatter.
- DEPRECATED: golint - Detects style mistakes in Go code.
- staticcheck - Go programming language linter.
- goimports - Format code and fix your import statements.
- gofumpt - A stricter gofmt.
- revive - Fast, configurable, extensible, flexible, and beautiful linter for Go.
Code generation, Templating and Generics
- json-to-go - Generate Go structs from JSON.
- Go gen - Type-driven code generation (generics).
- gojson - Another Go struct generator.
- gotemplate - Package-based templating system for Go.
- DEPRECATED: sqlgen - Generate Go code for SQL interactions.
- zek - Generate Go struct from XML.
- apidocgen - Generate web apis markdown docs and mocks.
- goaccessor - Getters and setters generator.
Refactoring
Articles
Tools
- eg - Example-based refactoring tool for Go.
- gofmt - Start with the standard Go code formatter.
- gorename - Renaming tool for Go.
Error Detection
Articles
Tools
Navigation
Visualization
- godepgraph - A tool for generating dependency graphs of Go code.
- go-size-analyzer - A tool that shows the size of each dependency of a Go binary.