General cleanup (#999)

This commit is contained in:
Nathan Baulch
2025-08-24 20:18:46 +10:00
committed by GitHub
parent 18a2148713
commit 36df8eef6e
15 changed files with 47 additions and 44 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ package benchmark_test
import (
"compress/gzip"
"encoding/json"
"io/ioutil"
"io"
"os"
"path/filepath"
"testing"
@@ -74,7 +74,7 @@ func fixture(tb testing.TB, path string) []byte {
gz, err := gzip.NewReader(f)
assert.NoError(tb, err)
buf, err := ioutil.ReadAll(gz)
buf, err := io.ReadAll(gz)
assert.NoError(tb, err)
return buf
}
+4 -4
View File
@@ -2,7 +2,7 @@ package benchmark_test
import (
"bytes"
"io/ioutil"
"os"
"testing"
"time"
@@ -59,7 +59,7 @@ func BenchmarkUnmarshal(b *testing.B) {
})
b.Run("ReferenceFile", func(b *testing.B) {
bytes, err := ioutil.ReadFile("benchmark.toml")
bytes, err := os.ReadFile("benchmark.toml")
if err != nil {
b.Fatal(err)
}
@@ -165,7 +165,7 @@ func BenchmarkMarshal(b *testing.B) {
})
b.Run("ReferenceFile", func(b *testing.B) {
bytes, err := ioutil.ReadFile("benchmark.toml")
bytes, err := os.ReadFile("benchmark.toml")
if err != nil {
b.Fatal(err)
}
@@ -344,7 +344,7 @@ type benchmarkDoc struct {
}
func TestUnmarshalReferenceFile(t *testing.T) {
bytes, err := ioutil.ReadFile("benchmark.toml")
bytes, err := os.ReadFile("benchmark.toml")
assert.NoError(t, err)
d := benchmarkDoc{}
err = toml.Unmarshal(bytes, &d)