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

I agree 100%, but here's a plot twist:

- Don't fall in the trap of early abstraction...

- and abstracting one single use case is very hard, if not impossible...

- but you are writing your app in Go and interfaces are the only way to properly test your stuff...

- The end.



> in Go and interfaces are the only way to properly test

Adding tests using interfaces is solely adding more code (and the method signatures are simply duplicated) so it's the exact opposite of OP's problem.




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

Search: