From 2b893091dcf78e971b6b721b7e73fb914fe149a0 Mon Sep 17 00:00:00 2001 From: darkweak Date: Wed, 19 Jul 2023 15:16:58 +0200 Subject: [PATCH] fix(ci): lint --- httpcache_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/httpcache_test.go b/httpcache_test.go index 9093be7..598d120 100644 --- a/httpcache_test.go +++ b/httpcache_test.go @@ -343,7 +343,7 @@ func (t *testErrorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Set("Cache-Control", "must-revalidate") w.WriteHeader(http.StatusOK) - w.Write([]byte("Hello must-revalidate!")) + _, _ = w.Write([]byte("Hello must-revalidate!")) } func TestMustRevalidate(t *testing.T) { @@ -366,7 +366,9 @@ func TestMustRevalidate(t *testing.T) { }`, "caddyfile") errorHandler := testErrorHandler{} - go http.ListenAndServe(":9081", &errorHandler) + go func(teh *testErrorHandler) { + http.ListenAndServe(":9081", teh) + }(&errorHandler) time.Sleep(time.Second) resp1, _ := tester.AssertGetResponse(`http://localhost:9080/cache-default`, http.StatusOK, "Hello must-revalidate!") resp2, _ := tester.AssertGetResponse(`http://localhost:9080/cache-default`, http.StatusOK, "Hello must-revalidate!")