go18/book/v4/main.go
2025-05-25 15:19:00 +08:00

26 lines
645 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package main
import (
"github.com/infraboard/mcube/v2/ioc/server/cmd"
// 业务对象
_ "122.51.31.227/go-course/go18/book/v4/apps"
)
func main() {
// ioc框架 加载对象, 注入对象, 配置对象
// server.Gin.Run()
// application.Get().AppName
// http.Get().Host
// server.DefaultConfig.ConfigFile.Enabled = true
// server.DefaultConfig.ConfigFile.Path = "application.toml"
// server.Run(context.Background())
// 不能指定配置文件逻辑
// 使用者来说,体验不佳
// ioc 直接提供server, 直接run就行了
// mcube 包含 一个 gin Engine
// CLI, start 指令 -f 指定配置文件
cmd.Start()
}