Skip to content

Glossary: Software Design Patterns in Go

Constructor injection

Passing a value its dependencies as arguments to its constructor function (`NewOrderLog`), so it keeps them for its whole life instead of making them itself.

Where the book teaches it

Related terms

Dependency injectionDependency