Si

Simple Go mocks without interface{}s

Hacker News

Simple Go mocks without interface{}s

I've been a pretty happy user of mockery [1] for a while, but recently found it getting a lot in my way. Since mockery uses a lot of interface{} magic, adding arguments or return values to interfaces and regenerating the mocks does not get the compiler to complain about existing, now invalid, usages of the mocks. This means that I have to track them down manually. Or, if I'm brave enough, try my hand at a few crazy regexes that never get the job 100% done. go-mocky does not use interface{}s, and thus can't hide changes to function signatures from the compiler; whenever a mock has been updated and the function signature has changed, the compiler will complain for all existing tests. This means that I can now catch errors at compile/lint time instead of runtime. Another added benefit is that the go-mocky mocks are dead simple and very easy to write and maintain by hand, should the need ever arise. [1]: https://github.com/vektra/mockery

Share card

Actual performance

1points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: user, plain · Missing: mac, agents, macos
61%61% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: exist, existing, ide · Missing: https docs, excited, just released
57%57% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRFits verified-revenue profile · Strong signals: way · Missing: mobile apps, ios, personal
52%52% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: interface · Missing: plus, platform, intuitive
47%47% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Indie HackersIH features products with proven revenue · Missing: supports, reddit linkedin, podcasting
21%21% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
14%14% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Si
Simple Scala Interface for Graphviz40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Simple Scala Interface for Graphviz

Hacker News3
Gu
Gutenberg – A simple interface to the Project Gutenberg corpus46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Gutenberg – A simple interface to the Project Gutenberg corpus

Hacker News94
Gr
Growly, a simple zero-dependency interface for Growl39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Growly, a simple zero-dependency interface for Growl

Hacker News1
Pe
Perl interface to Osram Lightify lighting system43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Perl interface to Osram Lightify lighting system

Hacker News3
A
A gopher interface to IPFS59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A gopher interface to IPFS

Hacker News1
A
A WebAssembly System Interface Implementation for Deno57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A WebAssembly System Interface Implementation for Deno

Hacker News90
Co
Collage Interface for Stable Diffusion62%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Collage Interface for Stable Diffusion

Hacker News3
Me
Memcached/Couchbase NodeJS Interface with Promises24%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Memcached/Couchbase NodeJS Interface with Promises

Hacker News1
Go
Golang, cache interface for you webapps42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Golang, cache interface for you webapps

Hacker News4
Go
Go GDB/MI interface43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Go GDB/MI interface

Hacker News1