Skip to content

Commit

Permalink
Replace ioutil.Discard with io.Discard
Browse files Browse the repository at this point in the history
Address a report by staticcheck: "io/ioutil" has been deprecated since
Go 1.16: As of Go 1.16, the same functionality is now provided by
package io or package os, and those implementations should be preferred
in new code. […] (SA1019)
  • Loading branch information
hansmi committed Dec 25, 2022
1 parent 6edbe48 commit bed5422
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"context"
"fmt"
"io/ioutil"
"io"
"log"
"testing"

Expand All @@ -20,7 +20,7 @@ func disableLogOutput(t *testing.T) {

previous := log.Writer()

log.SetOutput(ioutil.Discard)
log.SetOutput(io.Discard)

t.Cleanup(func() {
log.SetOutput(previous)
Expand Down

0 comments on commit bed5422

Please sign in to comment.