菜单
NOT ON THE CURRENT EDITION
This blip is not on the current edition of the radar. If it was on one of the last few editions it is likely that it is still relevant. If the blip is older it might no longer be relevant and our assessment might be different today. Unfortunately, we simply don't have the bandwidth to continuously review blips from previous editions of the radarUnderstand more
Published: May 19, 2020
May 2020
评估?

Golang 社区中有相当一部分人是依赖注入怀疑论者,部分原因是他们将模式与特定框架相混淆,并且具有系统编程背景的开发人员本能地不喜欢反射引起的运行时开销。Wire 应运而生,这是一种编译时依赖注入工具,可以同时生成代码并将组件连接在一起。Wire 没有额外的运行时开销,并且更易于推断静态依赖关系图。 无论你手写代码还是使用框架,我们都建议使用依赖注入来鼓励模块化和可测试的设计。