uber-go/gopatch
Refactoring and code transformation tool for Go. observed · 2026-08-28
Health v2 · maintenance only
26/100
- Activity 6
- Release rhythm 8
- Longevity 100
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: 2102
- days_rel: n/a
- days_push: 568
- n_releases_24m: 0
Adoption not part of the score
1039 stars · 42 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
gopatch is a command-line tool for matching and transforming Go source code using patch files that understand Go syntax. It operates like the Unix patch tool but performs AST-aware refactoring and restyling rather than plain text substitution.
Use cases
- automate refactoring across a large Go codebase
- replace errors.New(fmt.Sprintf(...)) with fmt.Errorf everywhere
- write custom lint autofixes as patch files
- enforce code style changes in Go projects
- apply syntax-aware bulk code transformations
- codify recurring code migration patterns
When to choose
- you need to make repetitive structural changes across many Go files
- you want to encode team style fixes as reusable patch files
- text-based sed/patch is too fragile because you need Go syntax awareness
When to avoid
- you work in languages other than Go
- you need one-off simple text substitutions that sed handles fine
- you need full IDE-integrated interactive refactoring
Facets
cli-tool · maturity active
developer-tools parser formatter developer-tools programming-languages windows cli go go refactoring code-transformation ast patch static-analysis automation linux macos
1 source
- readme: https://github.com/uber-go/gopatch · fetched 2026-08-28 · 94b35f8d865d
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| uber-go/gopatch | main | 26 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem