bradfitz/goimports
(old repo) Tool to fix (add, remove) your Go imports automatically. observed · 2026-08-28
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4841
- days_rel: n/a
- days_push: 1981
- n_releases_24m: 0
Adoption not part of the score
1039 stars · 77 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
goimports is a Go command-line tool that automatically fixes import lines by adding missing imports and removing unreferenced ones, while also formatting code like gofmt. This original repository has moved into the official golang.org/x/tools repo, where it continues to be maintained.
Use cases
- automatically add missing Go imports
- remove unused imports from Go files
- format Go code on save in my editor
- replace gofmt with a tool that also fixes imports
- clean up import statements in a Go project
- integrate import fixing into vim or emacs workflow
When to choose
- you write Go and want automatic import management plus gofmt-style formatting
- you want a gofmt-on-save hook that also fixes imports
- you want an official, actively maintained tool from golang.org/x/tools
When to avoid
- you need a formatter for languages other than Go
- you want to contribute to this old mirror repo - PRs are no longer accepted
- you rely on non-gofmt formatting styles
Facets
cli-tool · maturity maintenance
formatter developer-tools cli developer-tools programming-languages cli cross-platform go goimports gofmt import-management code-formatting editor-integration command-line
5 sources
- readme: https://github.com/bradfitz/goimports · fetched 2026-08-28 · 659c0d2abad3
- homepage: https://godoc.org/golang.org/x/tools/cmd/goimports · fetched 2026-08-29 · bc8679fa987c
- site_page: https://pkg.go.dev/about · fetched 2026-08-29 · 757852027879
- site_page: https://pkg.go.dev/golang.org/x/tools/cmd/goimports · fetched 2026-08-29 · c32647712d95
- site_page: https://go.dev/project · fetched 2026-08-29 · d5ca00bb378b
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| bradfitz/goimports | main | 32 |
For agents
markdown · JSON · MCP: product_card(name="bradfitz/goimports")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem