Skip to Content
Learning Functional Programming in Go
book

Learning Functional Programming in Go

by Lex Sheehan
November 2017
Intermediate to advanced
670 pages
17h 35m
English
Packt Publishing
Content preview from Learning Functional Programming in Go

Dependency injection

Dependency injection (DI) is a form of Inversion of Control and also impacts the flow of control in an application. Although the observer pattern's callback mechanism can modify the flow at many times and in many places in an application, DI typically performs the flow of control configuration during application initialization.

Since this chapter is mainly about a layered architecture and the management of dependencies to prevent circular dependency errors, we will not explore pub/sub architectures and the observer pattern. Instead, we will choose DI to reconcile our dependencies in our main function.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Functional Programming

Learning Functional Programming

Jack Widman

Publisher Resources

ISBN: 9781787281394Supplemental Content