What's the best approach for mocking a function /method?

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

Our great sponsors
  • SonarLint - Clean code begins in your IDE with SonarLint
  • Scout APM - Less time debugging, more time building
  • SaaSHub - Software Alternatives and Reviews
  • counterfeiter

    A tool for generating self-contained, type-safe test doubles in go

  • keploy

    No code API testing platform. Create unit tests and data mocks from API calls.

    If you want something quick, you can also try keploy. You can generate API-level tests along with mocks with it, so you won't have you mock your databases or dependencies manually.

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

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