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

chore: remove refs to deprecated io/ioutil #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions glog_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package glog

import (
"flag"
"io/ioutil"
"io"
"runtime"
"sync"
"sync/atomic"
Expand Down Expand Up @@ -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 }
}

Expand Down
6 changes: 3 additions & 3 deletions glog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"bytes"
"flag"
"fmt"
"io/ioutil"
stdLog "log"
"os"
"path/filepath"
"runtime"
"strconv"
Expand Down Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down