Skip to content

Commit

Permalink
Merge pull request #13017 from hashicorp/backport/refactor/remove_dep…
Browse files Browse the repository at this point in the history
…recated_ioutil_functions/gratefully-learning-elephant

This pull request was automerged via backport-assistant
  • Loading branch information
hc-github-team-packer authored Jun 3, 2024
2 parents 5a09186 + fc0162a commit f40dbb5
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 f40dbb5

Please sign in to comment.