Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unchecked call to io.Copy #57

Merged
merged 1 commit into from
Nov 2, 2020
Merged

Conversation

kouk
Copy link
Contributor

@kouk kouk commented Nov 2, 2020

After #49 was merged to master the build failed due to a linting error:

GO111MODULE=on /go/bin/golangci-lint run  ./...
exporter/util.go:162:10: Error return value of `io.Copy` is not checked
(errcheck)
                io.Copy(ioutil.Discard, resp.Body)
                       ^
make: *** [Makefile.common:192: common-lint] Error 1

build failure here:
https://app.circleci.com/pipelines/github/prometheus-community/json_exporter/28/workflows/e2c53db3-d3a3-4faa-a5a6-3b1fbb5754a0/jobs/71

After prometheus-community#49 was merged to master the build failed due to a linting error:

    GO111MODULE=on /go/bin/golangci-lint run  ./...
    exporter/util.go:162:10: Error return value of `io.Copy` is not checked
    (errcheck)
                    io.Copy(ioutil.Discard, resp.Body)
                           ^
    make: *** [Makefile.common:192: common-lint] Error 1

build failure here:
https://app.circleci.com/pipelines/github/prometheus-community/json_exporter/28/workflows/e2c53db3-d3a3-4faa-a5a6-3b1fbb5754a0/jobs/71

Signed-off-by: Konstantinos Koukopoulos <[email protected]>
Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@SuperQ SuperQ merged commit 052921b into prometheus-community:master Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants