The Go Programming Language
› http://golang.org/
› Go Playground
Go Projects
› Revel Web Framework
ke1e

Go 语言中 Web 项目的依赖管理的最佳实践是什么?不使用 DI 的情况下

  •  
  •   ke1e · Aug 24, 2024 · 1508 views
    This topic created in 766 days ago, the information mentioned may be changed or developed.
    Go Web 项目应该还是 MVC 架构吧;

    那么 Service 还是用单例模式嘛?

    是在 Route 初始化的时,构造 Handler 将 Service 初始化传进去嘛,如果需要用到别的 Service 呐?

    那么如果异步任务模块也用到了这些 Service 呐?

    有没有大佬解答下
    1 replies
    saibotan
        1
    saibotan  
       Aug 27, 2024
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3002 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 00:29 · PVG 08:29 · LAX 17:29 · JFK 20:29
    ♥ Do have faith in what you're doing.