mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 09:00:04 +08:00
模块化上传驱动,使用泛型优化工具库降低冗余
This commit is contained in:
@@ -23,10 +23,8 @@ func Tpl(name, tpl string) string {
|
||||
// 最终效果:/应用名称/插件模块名称/xxx/xxx。如果你不喜欢现在的路由风格,可以自行调整
|
||||
func RouterPrefix(ctx context.Context, app, name string) string {
|
||||
var prefix = "/"
|
||||
|
||||
if app != "" {
|
||||
prefix = g.Cfg().MustGet(ctx, "router."+app+".prefix", "/"+app+"").String()
|
||||
}
|
||||
|
||||
return prefix + "/" + name
|
||||
}
|
||||
|
Reference in New Issue
Block a user