@@ -3,7 +3,7 @@ package zerolog
33import (
44 "context"
55 "errors"
6- "io/ioutil "
6+ "io"
77 "net"
88 "testing"
99 "time"
1515)
1616
1717func BenchmarkLogEmpty (b * testing.B ) {
18- logger := New (ioutil .Discard )
18+ logger := New (io .Discard )
1919 b .ResetTimer ()
2020 b .RunParallel (func (pb * testing.PB ) {
2121 for pb .Next () {
@@ -25,7 +25,7 @@ func BenchmarkLogEmpty(b *testing.B) {
2525}
2626
2727func BenchmarkDisabled (b * testing.B ) {
28- logger := New (ioutil .Discard ).Level (Disabled )
28+ logger := New (io .Discard ).Level (Disabled )
2929 b .ResetTimer ()
3030 b .RunParallel (func (pb * testing.PB ) {
3131 for pb .Next () {
@@ -35,7 +35,7 @@ func BenchmarkDisabled(b *testing.B) {
3535}
3636
3737func BenchmarkInfo (b * testing.B ) {
38- logger := New (ioutil .Discard )
38+ logger := New (io .Discard )
3939 b .ResetTimer ()
4040 b .RunParallel (func (pb * testing.PB ) {
4141 for pb .Next () {
@@ -45,7 +45,7 @@ func BenchmarkInfo(b *testing.B) {
4545}
4646
4747func BenchmarkContextFields (b * testing.B ) {
48- logger := New (ioutil .Discard ).With ().
48+ logger := New (io .Discard ).With ().
4949 Str ("string" , "four!" ).
5050 Time ("time" , time.Time {}).
5151 Int ("int" , 123 ).
@@ -60,7 +60,7 @@ func BenchmarkContextFields(b *testing.B) {
6060}
6161
6262func BenchmarkContextAppend (b * testing.B ) {
63- logger := New (ioutil .Discard ).With ().
63+ logger := New (io .Discard ).With ().
6464 Str ("foo" , "bar" ).
6565 Logger ()
6666 b .ResetTimer ()
@@ -72,7 +72,7 @@ func BenchmarkContextAppend(b *testing.B) {
7272}
7373
7474func BenchmarkLogFields (b * testing.B ) {
75- logger := New (ioutil .Discard )
75+ logger := New (io .Discard )
7676 b .ResetTimer ()
7777 b .RunParallel (func (pb * testing.PB ) {
7878 for pb .Next () {
@@ -102,7 +102,7 @@ func BenchmarkLogArrayObject(b *testing.B) {
102102 obj1 := obj {"a" , "b" , 2 }
103103 obj2 := obj {"c" , "d" , 3 }
104104 obj3 := obj {"e" , "f" , 4 }
105- logger := New (ioutil .Discard )
105+ logger := New (io .Discard )
106106 b .ResetTimer ()
107107 b .ReportAllocs ()
108108 for i := 0 ; i < b .N ; i ++ {
@@ -224,7 +224,7 @@ func BenchmarkLogFieldType(b *testing.B) {
224224 return e .Object ("k" , objects [0 ])
225225 },
226226 }
227- logger := New (ioutil .Discard )
227+ logger := New (io .Discard )
228228 b .ResetTimer ()
229229 for name := range types {
230230 f := types [name ]
@@ -358,7 +358,7 @@ func BenchmarkContextFieldType(b *testing.B) {
358358 return c .Timestamp ()
359359 },
360360 }
361- logger := New (ioutil .Discard )
361+ logger := New (io .Discard )
362362 b .ResetTimer ()
363363 for name := range types {
364364 f := types [name ]
0 commit comments