From 196f870ab791d94a1e4f45456aef5829bdb3afb9 Mon Sep 17 00:00:00 2001 From: voidint Date: Tue, 28 Nov 2023 20:43:21 +0800 Subject: [PATCH] fix: fix static check failures --- collector/aliyun/aliyun_collector_test.go | 2 +- collector/official/official_collector_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/collector/aliyun/aliyun_collector_test.go b/collector/aliyun/aliyun_collector_test.go index 55968ab..0585f0e 100644 --- a/collector/aliyun/aliyun_collector_test.go +++ b/collector/aliyun/aliyun_collector_test.go @@ -95,7 +95,7 @@ func TestNewCollector(t *testing.T) { rr2.WriteHeader(http.StatusOK) htmlData, err := os.ReadFile("./testdata/golang_dl.html") assert.Nil(t, err) - rr2.Write(htmlData) + _, _ = rr2.Write(htmlData) patches := gomonkey.ApplyMethodSeq(&http.Client{}, "Get", []gomonkey.OutputCell{ {Values: gomonkey.Params{nil, errors.New("unknown error")}}, diff --git a/collector/official/official_collector_test.go b/collector/official/official_collector_test.go index 0ac766a..97456f6 100644 --- a/collector/official/official_collector_test.go +++ b/collector/official/official_collector_test.go @@ -273,7 +273,7 @@ func TestNewCollector(t *testing.T) { rr2.WriteHeader(http.StatusOK) htmlData, err := os.ReadFile("./testdata/golang_dl_with_rc.html") assert.Nil(t, err) - rr2.Write(htmlData) + _, _ = rr2.Write(htmlData) patches := gomonkey.ApplyMethodSeq(&http.Client{}, "Get", []gomonkey.OutputCell{ {Values: gomonkey.Params{nil, errors.New("unknown error")}},