goimports
pkg.go.dev
Spec sheet
- Purpose
- goimports updates Go import lines by adding missing imports and removing unreferenced imports.Read 8 Oct 2026 · pkg.go.dev
- Intended users
- The documentation presents goimports as a tool for Go developers who want imports corrected and code formatted in their editor workflow.Read 8 Oct 2026 · pkg.go.dev
- Support
- The package documentation directs users to the Go issue tracker for bugs and feature requests.Read 8 Oct 2026 · pkg.go.dev
- License
- The package page identifies its license as BSD-3-Clause and marks it redistributable.Read 8 Oct 2026 · pkg.go.dev
- Directory exclusions
- It reads `$GOPATH/src/.goimportsignore` to exclude directories from scanning, with blank lines, comments, or directory names and no globbing or regex patterns.Read 8 Oct 2026 · pkg.go.dev
- Editor integrations
- The documentation describes using goimports with Emacs, Vim, and GoSublime, and says it can be configured for other editors.Read 8 Oct 2026 · pkg.go.dev
- Formatting
- It formats code in the same style as gofmt and can replace an editor’s gofmt-on-save hook.Read 8 Oct 2026 · pkg.go.dev
- Installation
- The package page gives `go install golang.org/x/tools/cmd/goimports@latest` as the installation command.Read 8 Oct 2026 · pkg.go.dev
- Verbose mode
- The `-v` flag provides verbose output to help verify directory exclusions and see what goimports is doing.Read 8 Oct 2026 · pkg.go.dev
- Version status
- The package page identifies version v0.51.0 and notes that the package is not in the latest version of its module.Read 8 Oct 2026 · pkg.go.dev
Plans and prices
Free Free Open source command-line tool · BSD-3-Clause license Read 8 Oct 2026 · pkg.go.dev
Where Specifiction places it
- Code Formatting Tools#17 of 347.7