diff --git a/.golangci.yml b/.golangci.yml index 6d3e8a937..18e5b8e80 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,7 +5,7 @@ linters: - depguard - errorlint - exptostd - #- fatcontext + - fatcontext #- gocritic - godot - govet diff --git a/route/route.go b/route/route.go index e89fe7ebc..18039fac0 100644 --- a/route/route.go +++ b/route/route.go @@ -78,7 +78,7 @@ func (r *Router) handle(handlerName string, h http.HandlerFunc) httprouter.Handl defer cancel() for _, p := range params { - ctx = context.WithValue(ctx, param(p.Key), p.Value) + ctx = context.WithValue(ctx, param(p.Key), p.Value) //nolint:fatcontext } h(w, req.WithContext(ctx)) } diff --git a/route/route_test.go b/route/route_test.go index dd3303074..773be4891 100644 --- a/route/route_test.go +++ b/route/route_test.go @@ -71,7 +71,7 @@ func TestContextWithValue(t *testing.T) { ctx := r.Context() for p, v := range params { - ctx = WithParam(ctx, p, v) + ctx = WithParam(ctx, p, v) //nolint:fatcontext } r = r.WithContext(ctx) router.ServeHTTP(nil, r)