Skip to content

Commit a7a03b4

Browse files
committed
update workflow, fix golang lint
1 parent 333dd7a commit a7a03b4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/golangci-lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ jobs:
2222
with:
2323
go-version: stable
2424
- name: golangci-lint
25-
uses: golangci/golangci-lint-action@v6
25+
uses: golangci/golangci-lint-action@v7
2626
with:
27-
version: v1.64
27+
version: v2.0

pkg/scraper/scraper.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func (s *Scraper) Collect(ch chan<- prometheus.Metric) {
9595
return
9696
}
9797

98-
defer resp.Body.Close()
98+
defer func() { _ = resp.Body.Close() }()
9999
body, err := io.ReadAll(resp.Body)
100100
if err != nil {
101101
s.errCnt++

0 commit comments

Comments
 (0)