Skip to content

Latest commit

 

History

History

example49-dependency-injection

Dependency Injection in Go

Wire is a code generation tool that automates connecting components using dependency injection.

DI

Install

go install github.com/google/wire/cmd/wire@latest

and ensuring that $GOPATH/bin is added to your $PATH.

Code Generate

wire gen ./...