Google Wire is not a standard Go library and is not included in the Go source code provided; use the official github.com/google/wire module instead. To use it, install the tool, define your dependencies in a wire.go file, and generate the wiring code.
go install github.com/google/wire/cmd/wire@latest
wire
- Install the Wire tool by running the install command above.
- Create a
wire.gofile in your package to define providers and injectors usingwire.Build. - Run
wirein your module directory to generate thewire_gen.gofile containing the dependency injection logic.