Do you want code that is easier to maintain? How about easier to test? Easier to extend? Dependency Injection (DI) might be just the tool you need.
In this chapter, we will define DI, perhaps in a somewhat atypical way, and explore the code smells that could indicate you need DI. We will also talk briefly about Go and how I would like you to approach the ideas presented in this book.
Are you ready to join me on a journey to better Go code?
We will cover the following topics:
- Why does DI matter?
- What is DI?
- When should I apply DI?
- How can I improve as a Go programmer?