Dependency injection compared to global interfaces in golang

前端 未结 0 957
野的像风
野的像风 2020-12-13 22:52

One of the reasons I see for preferring dependency injection over global variables is that it becomes difficult to mock a global during testing. But suppose I declare the gl

相关标签:
回答
  • 消灭零回复
提交回复
热议问题