BTW I am aware that some build tag tricks can be used to achieve this. I was wondering it there is an idiomatic way or any best practices for using wire.
On Saturday, April 13, 2019 at 3:19:58 PM UTC+2, Kaveh Shahbazian wrote: > > Assume wire is going to be used for dependency injection here. And we have > a provider function called NewService that returns an interface. > > There is the actual implementation for that interface that - for example - > connects to PostgreSQL. > > And we have also the mock for that interface. > > Now we need to inject the mock for unit tests and the actual > implementation if we are not testing. > > How that can be done? > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.