feat: add load additional middleware from a defined directory

This commit is contained in:
Jonas Kaninda
2024-11-21 16:52:08 +01:00
parent 9d02bfa2bc
commit 7369d5eebf
6 changed files with 86 additions and 18 deletions

View File

@@ -43,6 +43,9 @@ func loadExtraRoutes(routePath string) ([]Route, error) {
extraRoutes = append(extraRoutes, ex.Routes...)
}
if len(extraRoutes) == 0 {
return nil, fmt.Errorf("no extra routes found")
}
return extraRoutes, nil
}