Skip to content

Commit bed5422

Browse files
committed
Replace ioutil.Discard with io.Discard
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)
1 parent 6edbe48 commit bed5422

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

collector_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"bytes"
55
"context"
66
"fmt"
7-
"io/ioutil"
7+
"io"
88
"log"
99
"testing"
1010

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

2121
previous := log.Writer()
2222

23-
log.SetOutput(ioutil.Discard)
23+
log.SetOutput(io.Discard)
2424

2525
t.Cleanup(func() {
2626
log.SetOutput(previous)

0 commit comments

Comments
 (0)