idea with uber dig & fx

Visualize Dependency graph

With uber fx use a dependency center, we can export dependency graph to a visual present format, like png or something else.

We can send an email with a dependency graph image weekly to everyone for module review from the big scene. Find problem ahead.

Check dependency & code rule

We can make some enhance rule according to framework layer. like:

  • handler can only import module, not import dao
  • module can only import dao
  • ....

Can achieve this use reflect and some go library.

TODO

get some inspire from google wire

猜你喜欢

转载自blog.csdn.net/weixin_34280237/article/details/87012396
dig
FX