Is gomock still maintained and recommended?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • moq

    Interface mocking tool for go generate (by matryer)

  • ``` https://github.com/matryer/moq

  • Testify

    A toolkit with common assertions and mocks that plays nicely with the standard library

  • To answer OP directly, I am largely quite happy with mockery (and testify) to write expressive tests.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • gomock

    Discontinued GoMock is a mocking framework for the Go programming language. (by golang)

  • Looking at gomock's commit history, it seems like there hasn't been much activity on the project in a couple of years. I'm wondering if this is the case of software being mostly done and just in maintenance mode, or if gomock is falling behind. The reason I fear for the latter is there are still issues being opened up that don't seem to be engaged very much.

  • mockery

    A mock code autogenerator for Go (by vektra)

  • When there's just one heavyweight dependency you're interacting with, perhaps a one-off stub/fake is simpler, but I would posit that auto-generated mocks via things like mockery + go:generate leave less test code to maintain vs. perhaps many stubs across the project.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts