refactor: refactoring of code

Add graceful shutdown server
This commit is contained in:
Jonas Kaninda
2024-11-15 14:24:35 +01:00
parent 5665ee3dab
commit f1af5c3ce6
26 changed files with 267 additions and 181 deletions

View File

@@ -14,7 +14,7 @@ func getMiddleware(rules []string, middlewares []Middleware) (Middleware, error)
continue
}
return Middleware{}, errors.New("middleware not found with name: [" + strings.Join(rules, ";") + "]")
return Middleware{}, errors.New("middlewares not found with name: [" + strings.Join(rules, ";") + "]")
}
func doesExist(tyName string) bool {
@@ -30,5 +30,5 @@ func GetMiddleware(rule string, middlewares []Middleware) (Middleware, error) {
continue
}
return Middleware{}, errors.New("no middleware found with name " + rule)
return Middleware{}, errors.New("no middlewares found with name " + rule)
}