This package demonstrates how Dependency Injection can be used with the Go programming language. It is an excellent fit!
The logclient package implements a LogClient type (class) with a single injected dependency: the log to be written.
Download, build, and test this example with go test github.com/glenn-brown/golang-di-example or view the documentation with go doc github.com/glenn-brown/golang-di-example