Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
MrDarcy
3 months ago
|
parent
|
context
|
favorite
| on:
Don't Be Afraid of Types
In Go at least you simply define an interface and use it as the receiver then inject whatever mock object you want.
The mock itself may simply be a new type defined in your test case.
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
The mock itself may simply be a new type defined in your test case.