Read directlyhttps://github.com/google/wire?tab=readme-ov-filearrow-up-rightthe tutorial section
If interfaces are used, there are two ways to adapt wire:
NewXX methods return an interface instead of returning a concrete struct implementation; this style is not encouraged in Go
Use wire.Bind method
Using the bind method:
https://github.com/google/wire/blob/main/docs/guide.md#binding-interfacesarrow-up-right
Last updated 1 year ago