mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-14 15:56:44 +03:00
Use %w to wrap errors (#1175)
This commit is contained in:
@@ -58,7 +58,7 @@ func getExpvarRegexp(ctx *fasthttp.RequestCtx) (*regexp.Regexp, error) {
|
||||
}
|
||||
rr, err := regexp.Compile(r)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot parse r=%q: %s", r, err)
|
||||
return nil, fmt.Errorf("cannot parse r=%q: %w", r, err)
|
||||
}
|
||||
return rr, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user