refactor(service): 重构服务模块结构并优化模型配置

This commit is contained in:
2026-05-29 17:54:19 +08:00
parent d74559ae74
commit 55eb436639
7 changed files with 204 additions and 53 deletions

View File

@@ -8,6 +8,11 @@ import (
"github.com/gogf/gf/v2/util/gconv"
)
// GetServerName 获取服务名称
func GetServerName(ctx context.Context) string {
return g.Cfg().MustGet(ctx, "server.name", "").String()
}
// GetServerPort 从配置获取服务端口
func GetServerPort(ctx context.Context) string {
address := g.Cfg().MustGet(ctx, "server.address", ":8080").String()