FindSoftware

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.

Identity

Status
Active
Maintainer
Uber2
First release
20234

Rendering and deploy

Install with
go install3

Releases

Current major version
Pre-1.04
Last release
2025-08-184

Adoption

GitHub stars
3,4291
Contributors
1205

Why these figures do not compare

Sources

  1. 2026-11-09: links, Written in, License, GitHub stars
    api.github.com/repos/uber-go/mock
  2. 2026-11-09: links, Maintainer, Categories, Runtime
    github.com/uber-go/mock/blob/main/README.md
  3. 2026-11-09: Install with
    raw.githubusercontent.com/uber-go/mock/main/README.md
  4. 2026-11-09: First release, Current major version, Last release
    api.github.com/repos/uber-go/mock/releases
  5. 2026-11-09: Contributors
    api.github.com/repos/uber-go/mock/contributors?per_page=1

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON