diff options
author | Cherry Zhang <cherryyz@google.com> | 2020-10-28 09:12:20 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2020-10-28 09:12:20 -0400 |
commit | a16e30d162c1c7408db7821e7b9513cefa09c6ca (patch) | |
tree | af752ba9ba44c547df39bb0af9bff79f610ba9d5 /src/image/png/writer_test.go | |
parent | 91e4d2d57bc341dd82c98247117114c851380aef (diff) | |
parent | cf6cfba4d5358404dd890f6025e573a4b2156543 (diff) | |
download | go-a16e30d162c1c7408db7821e7b9513cefa09c6ca.tar.gz go-a16e30d162c1c7408db7821e7b9513cefa09c6ca.zip |
[dev.link] all: merge branch 'master' into dev.linkdev.link
Clean merge.
Change-Id: Ia7b2808bc649790198d34c226a61d9e569084dc5
Diffstat (limited to 'src/image/png/writer_test.go')
-rw-r--r-- | src/image/png/writer_test.go | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/image/png/writer_test.go b/src/image/png/writer_test.go index 5d131ff823..47aa861339 100644 --- a/src/image/png/writer_test.go +++ b/src/image/png/writer_test.go @@ -12,7 +12,6 @@ import ( "image" "image/color" "io" - "io/ioutil" "testing" ) @@ -169,7 +168,7 @@ func TestWriterPaletted(t *testing.T) { t.Error(err) return } - n, err := io.Copy(ioutil.Discard, r) + n, err := io.Copy(io.Discard, r) if err != nil { t.Errorf("got error while reading image data: %v", err) } @@ -234,7 +233,7 @@ func BenchmarkEncodeGray(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - Encode(ioutil.Discard, img) + Encode(io.Discard, img) } } @@ -259,7 +258,7 @@ func BenchmarkEncodeGrayWithBufferPool(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - e.Encode(ioutil.Discard, img) + e.Encode(io.Discard, img) } } @@ -279,7 +278,7 @@ func BenchmarkEncodeNRGBOpaque(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - Encode(ioutil.Discard, img) + Encode(io.Discard, img) } } @@ -292,7 +291,7 @@ func BenchmarkEncodeNRGBA(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - Encode(ioutil.Discard, img) + Encode(io.Discard, img) } } @@ -305,7 +304,7 @@ func BenchmarkEncodePaletted(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - Encode(ioutil.Discard, img) + Encode(io.Discard, img) } } @@ -325,7 +324,7 @@ func BenchmarkEncodeRGBOpaque(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - Encode(ioutil.Discard, img) + Encode(io.Discard, img) } } @@ -338,6 +337,6 @@ func BenchmarkEncodeRGBA(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - Encode(ioutil.Discard, img) + Encode(io.Discard, img) } } |