支持注册pprof相关路由

This commit is contained in:
2025-02-21 15:16:43 +08:00
parent bc94242d12
commit 4909e75928
5 changed files with 23 additions and 3 deletions

View File

@ -35,12 +35,12 @@ func init() {
//
// Date : 21:40 2024/7/20
func Register(port int, controllerList ...any) error {
for _, controller := range controllerList {
if nil == controller {
for _, itemController := range controllerList {
if nil == itemController {
// 忽略空指针
continue
}
parseController(controller)
parseController(itemController)
}
return ginRouter.Run(fmt.Sprintf(":%d", port))
}