chore: add configuration validation

This commit is contained in:
Jonas Kaninda
2024-11-24 06:04:55 +01:00
parent 6b2df85c88
commit c8b16a204c
4 changed files with 46 additions and 15 deletions

View File

@@ -49,6 +49,7 @@ func loadExtraRoutes(routePath string) ([]Route, error) {
return extraRoutes, nil
}
// findDuplicateRouteNames finds duplicated route names
func findDuplicateRouteNames(routes []Route) []string {
// Create a map to track occurrences of names
nameMap := make(map[string]int)