Skip to content

Commit

Permalink
ioutil to io (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuesdayinsighter authored May 16, 2024
1 parent bb55032 commit 88ce035
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions links.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"bytes"
"fmt"
"io"
"io/ioutil"
"math"

cid "github.com/ipfs/go-cid"
Expand Down Expand Up @@ -115,7 +114,7 @@ func discard(br io.Reader, n int) error {
}
return err
default:
discarded, err := io.CopyN(ioutil.Discard, br, int64(n))
discarded, err := io.CopyN(io.Discard, br, int64(n))
if discarded != 0 && discarded < int64(n) && err == io.EOF {
return io.ErrUnexpectedEOF
}
Expand Down
5 changes: 2 additions & 3 deletions testing/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package testing
import (
"bytes"
"io"
"io/ioutil"
"math/rand"
"reflect"
"testing"
Expand All @@ -26,7 +25,7 @@ func BenchmarkMarshaling(b *testing.B) {
b.ResetTimer()

for i := 0; i < b.N; i++ {
if err := tt.MarshalCBOR(ioutil.Discard); err != nil {
if err := tt.MarshalCBOR(io.Discard); err != nil {
b.Fatal(err)
}
}
Expand Down Expand Up @@ -130,7 +129,7 @@ func BenchmarkMapMarshaling(b *testing.B) {
b.ResetTimer()

for i := 0; i < b.N; i++ {
if err := tt.MarshalCBOR(ioutil.Discard); err != nil {
if err := tt.MarshalCBOR(io.Discard); err != nil {
b.Fatal(err)
}
}
Expand Down

0 comments on commit 88ce035

Please sign in to comment.