Skip to content

Commit

Permalink
Refactor usage of ioutil.Discard to io.Discard
Browse files Browse the repository at this point in the history
Documentation of ioutil.Discard says it's deprecated and identical to io.Discard.
  • Loading branch information
kaiburjack committed Aug 16, 2022
1 parent 59b31f8 commit 464ee0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"bytes"
"github.com/HBTGmbH/gosaxml"
"github.com/stretchr/testify/assert"
"io/ioutil"
"io"
"testing"
)

func BenchmarkEncodeStartTokenWithNamespaceModifier(b *testing.B) {
w := ioutil.Discard
w := io.Discard
enc := gosaxml.NewEncoder(w, gosaxml.NewNamespaceModifier())
token := gosaxml.Token{
Kind: gosaxml.TokenTypeStartElement,
Expand All @@ -35,7 +35,7 @@ func BenchmarkEncodeStartTokenWithNamespaceModifier(b *testing.B) {
}

func BenchmarkEncode(b *testing.B) {
w := ioutil.Discard
w := io.Discard
enc := gosaxml.NewEncoder(w)
token0 := gosaxml.Token{
Kind: gosaxml.TokenTypeStartElement,
Expand Down

0 comments on commit 464ee0e

Please sign in to comment.