matryer/moq
Interface mocking tool for go generate observed · 2026-08-28
Health v2 · maintenance only
75/100
- Activity 73
- Release rhythm 63
- 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: 81
- age_days: 3656
- days_rel: 166
- days_push: 166
- n_releases_24m: 6
Adoption not part of the score
2208 stars · 135 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Moq is a Go code generation tool that creates mock structs from any Go interface for use in unit tests. It integrates with go generate and produces structs with function fields for each interface method, enabling per-test mock behavior.
Use cases
- generate mocks for go interfaces
- reduce boilerplate when writing go unit tests
- mock dependencies in go tests via go generate
- verify interface method calls in tests
- create test doubles for interfaces
When to choose
- you write Go unit tests with interface-based dependencies
- you want mocks generated automatically via go generate
- you prefer lightweight function-field mocks over reflection-based mocking frameworks
When to avoid
- you need a full mocking framework with expectation DSLs
- your project is not written in Go
- you prefer hand-written fakes or stubs
Facets
cli-tool · maturity active
mocking testing cli developer-tools testing developer-tools go cli cross-platform go-generate codegen unit-testing interface-mocks command-line
2 sources
- readme: https://github.com/matryer/moq · fetched 2026-08-28 · 1cb658a2ae18
- homepage: http://bit.ly/meetmoq · fetched 2026-08-29 · 89a24741f521
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| matryer/moq | main | 75 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem