Hacker GitHub

← All repos

maxbrunsfeld/counterfeiter

View on GitHub ↗ ★ 1,147 Go

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

6 mentions on Hacker News by 6 people: 1 story, 5 comments · first 2014-06-01 · latest 2025-11-07

Mentions per year 6 mentions · busiest year 2017 (2)
20082026
  1. …as you create more mocks (since type checking is usually FAR slower than producing the mock). 1: https://github.com/maxbrunsfeld/counterfeiter/blob/000b82ca1...
    comment by Groxx · 2025-11-07 · in Revisiting Interface Segregation in Go
  2. Try https://github.com/maxbrunsfeld/counterfeiter
    comment by suralind · 2025-11-07 · in Revisiting Interface Segregation in Go
  3. …doing a bunch of maintenance on these projects the past few weeks. Edit: Also we use counterfeiter https://github.com/maxbrunsfeld/counterfeiter for fakes.
    comment by wlamartin · 2017-12-11 · in Ask HN: How to approach testing in Golang?
  4. …you can do it in Go using interfaces and code generation. Counterfeiter hooks into `go generate`: https://github.com/maxbrunsfeld/counterfeiter Here's an example project: https://github.com/andreasf/cf-mysql-plugin
  5. Counterfeiter is a pretty serviceable mock generator: https://github.com/maxbrunsfeld/counterfeiter
    comment by twic · 2016-05-01 · in Go best practices, six years in