Skip to content

Commit

Permalink
refactor: remove deprecated function
Browse files Browse the repository at this point in the history
  • Loading branch information
komisan19 authored and lbajolet-hashicorp committed Jun 3, 2024
1 parent d625694 commit 9390f71
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions post-processor/compress/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"compress/gzip"
"fmt"
"io"
"io/ioutil"
"os"
"runtime"
"testing"
Expand Down Expand Up @@ -138,7 +137,7 @@ func (c *Compressor) BenchmarkGZIPReader(b *testing.B) {
cr, _ := gzip.NewReader(c.w)
b.ResetTimer()

_, err := io.Copy(ioutil.Discard, cr)
_, err := io.Copy(io.Discard, cr)
if err != nil {
b.Fatal(err)
}
Expand All @@ -159,7 +158,7 @@ func (c *Compressor) BenchmarkBGZFReader(b *testing.B) {
cr, _ := bgzf.NewReader(c.w, 0)
b.ResetTimer()

_, err := io.Copy(ioutil.Discard, cr)
_, err := io.Copy(io.Discard, cr)
if err != nil {
b.Fatal(err)
}
Expand All @@ -181,7 +180,7 @@ func (c *Compressor) BenchmarkPGZIPReader(b *testing.B) {
cr, _ := pgzip.NewReader(c.w)
b.ResetTimer()

_, err := io.Copy(ioutil.Discard, cr)
_, err := io.Copy(io.Discard, cr)
if err != nil {
b.Fatal(err)
}
Expand All @@ -205,7 +204,7 @@ func (c *Compressor) BenchmarkLZ4Reader(b *testing.B) {
cr := lz4.NewReader(c.w)
b.ResetTimer()

_, err := io.Copy(ioutil.Discard, cr)
_, err := io.Copy(io.Discard, cr)
if err != nil {
b.Fatal(err)
}
Expand All @@ -227,7 +226,7 @@ func (c *Compressor) BenchmarkXZReader(b *testing.B) {
cr := xz.NewReader(c.w)
b.ResetTimer()

_, err := io.Copy(ioutil.Discard, cr)
_, err := io.Copy(io.Discard, cr)
if err != nil {
b.Fatal(err)
}
Expand Down

0 comments on commit 9390f71

Please sign in to comment.