跳转到内容

开始使用

理解 Plumego 的最快方式,是先跑通 canonical 参考应用。这条路径会直接展示 Plumego 希望保持显式的 bootstrap、route wiring 与 handler 形态。

  • Go 1.24+
  • 已经 checkout github.com/spcent/plumego
Terminal window
go run ./reference/standard-service
  • reference/standard-service/main.go:bootstrap 路径
  • reference/standard-service/internal/app/app.go:应用本地 wiring
  • reference/standard-service/internal/app/routes.go:显式 route 注册
  • reference/standard-service/internal/handler:transport-only handler
  • 参考服务可以在不增加外部依赖的情况下启动
  • route wiring 保持显式,而不是藏进注册魔法里
  • handler 形态依旧贴近标准库 HTTP 模型