Upgrade to golangci-lint v2 (#1008)

This commit is contained in:
Nathan Baulch
2026-01-05 01:54:29 +11:00
committed by GitHub
parent 9702fae9b8
commit a675c6b3e2
45 changed files with 568 additions and 649 deletions
+4 -4
View File
@@ -12,7 +12,7 @@ import (
"github.com/pelletier/go-toml/v2/internal/assert"
)
var bench_inputs = []struct {
var benchInputs = []struct {
name string
jsonLen int
}{
@@ -30,7 +30,7 @@ var bench_inputs = []struct {
}
func TestUnmarshalDatasetCode(t *testing.T) {
for _, tc := range bench_inputs {
for _, tc := range benchInputs {
t.Run(tc.name, func(t *testing.T) {
buf := fixture(t, tc.name)
@@ -45,7 +45,7 @@ func TestUnmarshalDatasetCode(t *testing.T) {
}
func BenchmarkUnmarshalDataset(b *testing.B) {
for _, tc := range bench_inputs {
for _, tc := range benchInputs {
b.Run(tc.name, func(b *testing.B) {
buf := fixture(b, tc.name)
b.SetBytes(int64(len(buf)))
@@ -69,7 +69,7 @@ func fixture(tb testing.TB, path string) []byte {
tb.Skip("benchmark fixture not found:", file)
}
assert.NoError(tb, err)
defer f.Close()
defer func() { _ = f.Close() }()
gz, err := gzip.NewReader(f)
assert.NoError(tb, err)