Introduced instance

This commit is contained in:
Viktor Sokolov
2025-09-02 11:43:59 +02:00
parent ac03563506
commit 067f1a97b6
28 changed files with 1070 additions and 814 deletions

View File

@@ -127,14 +127,16 @@ func (r *Router) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
rw.Header().Set(httpheaders.XRequestID, reqID)
for _, rr := range r.routes {
if rr.isMatch(req) {
if !rr.silent {
LogRequest(reqID, req)
}
rr.handler(reqID, rw, req)
return
if !rr.isMatch(req) {
continue
}
if !rr.silent {
LogRequest(reqID, req)
}
rr.handler(reqID, rw, req)
return
}
// Means that we have not found matching route