diff --git a/.golangci.yml b/.golangci.yml index 1c564ed04..846ace412 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -207,7 +207,6 @@ linters-settings: linters: enable-all: true disable: - - bodyclose - containedctx - contextcheck - cyclop diff --git a/examples/serverless/healthcheck/service.go b/examples/serverless/healthcheck/service.go index 60df561f5..2bcbed010 100644 --- a/examples/serverless/healthcheck/service.go +++ b/examples/serverless/healthcheck/service.go @@ -106,6 +106,9 @@ func (s *service) ping(path string) (code int32, err error) { if err != nil { return -1, err } + defer func() { + _ = response.Body.Close() + }() return int32(response.StatusCode), nil }