统一应用路由前缀规则

This commit is contained in:
孟帅
2023-06-12 17:49:29 +08:00
parent d9d257a067
commit e6abfbcacf
7 changed files with 21 additions and 16 deletions

View File

@@ -23,6 +23,11 @@ func AppName(ctx context.Context) string {
return g.Cfg().MustGet(ctx, "appName", "hotgo").String()
}
// RouterPrefix 获取应用路由前缀
func RouterPrefix(ctx context.Context, app string) string {
return g.Cfg().MustGet(ctx, "router."+app+".prefix", "/"+app+"").String()
}
// FilterMaskDemo 过滤演示环境下的配置隐藏字段
func FilterMaskDemo(ctx context.Context, src g.Map) g.Map {
if src == nil {