diff --git a/glog_bench_test.go b/glog_bench_test.go index 359546f8..da92c27a 100644 --- a/glog_bench_test.go +++ b/glog_bench_test.go @@ -2,7 +2,7 @@ package glog import ( "flag" - "io/ioutil" + "io" "runtime" "sync" "sync/atomic" @@ -39,7 +39,7 @@ func (s *fileSink) newDiscarders() severityWriters { func discardStderr() func() { se := sinks.stderr.w - sinks.stderr.w = ioutil.Discard + sinks.stderr.w = io.Discard return func() { sinks.stderr.w = se } } diff --git a/glog_test.go b/glog_test.go index 81c43ce1..bea9a249 100644 --- a/glog_test.go +++ b/glog_test.go @@ -4,8 +4,8 @@ import ( "bytes" "flag" "fmt" - "io/ioutil" stdLog "log" + "os" "path/filepath" "runtime" "strconv" @@ -511,7 +511,7 @@ func TestRollover(t *testing.T) { } // Check to see if the original file has the continued footer. - f0, err := ioutil.ReadFile(fname0) + f0, err := os.ReadFile(fname0) if err != nil { t.Fatalf("Unable to read file %s: %v", fname0, err) } @@ -535,7 +535,7 @@ func TestRollover(t *testing.T) { } // Check to see if the previous file header is there in the new file - f1, err := ioutil.ReadFile(fname1) + f1, err := os.ReadFile(fname1) if err != nil { t.Fatalf("Unable to read file %s: %v", fname1, err) }