- Hands-On Dependency Injection in Go
- Corey Scott
- 67字
- 2021-06-10 19:17:46
How does this relate to DI?
When applying DI to our code, we are unsurprisingly injecting our dependencies, typically in the form of a function parameter. If you see a function with many injected dependencies, this is a likely sign that the method is doing too much.
Additionally, applying SRP will inform our object design. As such, this helps us identify when and where to use DI.
推薦閱讀
- Flask Web全棧開發實戰
- 數據庫系統教程(第2版)
- Learning Cython Programming
- Android 7編程入門經典:使用Android Studio 2(第4版)
- 數據結構習題精解(C語言實現+微課視頻)
- Hands-On C++ Game Animation Programming
- The Data Visualization Workshop
- Python數據結構與算法(視頻教學版)
- Lighttpd源碼分析
- C#程序設計(項目教學版)
- 基于SpringBoot實現:Java分布式中間件開發入門與實戰
- Kubernetes進階實戰
- 愛上C語言:C KISS
- Hadoop Blueprints
- 每個人的Python:數學、算法和游戲編程訓練營