gomock
Mocking framework for Go that generates mock implementations of Go interfaces, with the mockgen tool.
gomock is a mocking framework for Go that generates mock implementations of Go interfaces. The mockgen tool takes a Go source file, a package archive or a package and writes the mock code, and the framework integrates with Go’s built-in testing package. The project began as Google’s golang/mock repository, which Google no longer maintains; Uber forked it and maintains the fork under the go.uber.org/mock module path.
Worth knowing
The README says the module supports the Go versions that the official Go Release Policy supports, which is the two most recent releases.
Sources
- 2026-11-09: links, Written in, License, GitHub stars
api.github.com/repos/uber-go/mock - 2026-11-09: links, Maintainer, Categories, Runtime
github.com/uber-go/mock/blob/main/README.md - 2026-11-09: Install with
raw.githubusercontent.com/uber-go/mock/main/README.md - 2026-11-09: First release, Current major version, Last release
api.github.com/repos/uber-go/mock/releases - 2026-11-09: Contributors
api.github.com/repos/uber-go/mock/contributors?per_page=1