Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I don't know much about Go but in Java and C# mocking frameworks use runtime bytecode manipulation to make it really easy to swap out concrete implementations without needing to create separate interfaces.

You cannot do that in Go, you need to write interfaces upfront. Or you can't unit test a controller that depends on a repository which concrete implementation relies on a database.

There is no "bytecode manipulation" here, since there is no bytecode.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: