Skip to content

Commit

Permalink
benchmark: remove call to deprecated ioutil package
Browse files Browse the repository at this point in the history
Signed-off-by: VirtualTam <[email protected]>
  • Loading branch information
virtualtam committed Oct 26, 2023
1 parent d2037f0 commit 3623544
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions marshal_benchmark_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package netscape_test

import (
"io/ioutil"
"os"
"testing"

"github.com/virtualtam/netscape-go/v2"
Expand Down Expand Up @@ -32,7 +32,7 @@ func BenchmarkMarshal(b *testing.B) {

for _, tc := range cases {
b.Run(tc.name, func(b *testing.B) {
bytes, err := ioutil.ReadFile(tc.filepath)
bytes, err := os.ReadFile(tc.filepath)
if err != nil {
b.Fatalf("failed to open file %q: %s", tc.filepath, err)
}
Expand All @@ -59,7 +59,7 @@ func BenchmarkUnmarshal(b *testing.B) {

for _, tc := range cases {
b.Run(tc.name, func(b *testing.B) {
bytes, err := ioutil.ReadFile(tc.filepath)
bytes, err := os.ReadFile(tc.filepath)
if err != nil {
b.Fatalf("failed to open file %q: %s", tc.filepath, err)
}
Expand Down

0 comments on commit 3623544

Please sign in to comment.