DMwangnima commented on issue #2377: URL: https://github.com/apache/dubbo-go/issues/2377#issuecomment-1681548860
> 依赖确实有点容易循环,有些模块会把一模一样的配置再拷贝一个 struct 出来,只是为了避免循环依赖,例如 [https://github.com/apache/dubbo-go/blob/bf5f2ddf40eaf9779355a692bab7842e290b54b2/config/metric_config.go#L45C55-L45C55,](https://github.com/apache/dubbo-go/blob/bf5f2ddf40eaf9779355a692bab7842e290b54b2/config/metric_config.go#L45C55-L45C55%EF%BC%8C) 是不是可以考虑做彻底点,把 config 只作为被依赖方,不再依赖其他模块 config包之前做为项目入口一直是顶层模块,如果不依赖其他模块,config.Load这一套启动流程没法保证。我的想法是config包做为顶层模块,把配置都往下传,层次较低的模块只看配置,不感知config包。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org