From ca8268e69e94106d737270aaee93022e716186a1 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 15 Apr 2020 15:52:20 +0100 Subject: [PATCH] More linting --- common/httpapi.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/httpapi.go b/common/httpapi.go index d49f11bc9..dcec3cb90 100644 --- a/common/httpapi.go +++ b/common/httpapi.go @@ -76,8 +76,9 @@ func MakeExternalAPI(metricsName string, f func(*http.Request) util.JSONResponse } } w.WriteHeader(resp.StatusCode) + // discard errors as this is for debugging _, _ = io.Copy(w, resp.Body) - resp.Body.Close() + _ = resp.Body.Close() }() // Log incoming request