Skip to content

Commit b999f00

Browse files
author
Gal Topper
authored
Fix lint errors (#566)
1 parent 2c0b91c commit b999f00

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

Diff for: pkg/config/config.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ package config
2323
import (
2424
"encoding/json"
2525
"fmt"
26-
"io/ioutil"
2726
"os"
2827
"strings"
2928
"sync"
@@ -354,7 +353,7 @@ func loadConfig(path string) (*V3ioConfig, error) {
354353
return nil, errors.Wrap(err, "Failed to read the TSDB configuration.")
355354
}
356355
} else {
357-
data, err = ioutil.ReadFile(resolvedPath)
356+
data, err = os.ReadFile(resolvedPath)
358357
if err != nil {
359358
return nil, err
360359
}

Diff for: test/benchmark/BenchmarkIngest_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ package benchmark
2121

2222
import (
2323
"fmt"
24-
"io/ioutil"
24+
"io"
2525
"log"
2626
"sync/atomic"
2727
"testing"
@@ -55,7 +55,7 @@ func BenchmarkIngest(b *testing.B) {
5555
defer metricReporter.Stop()
5656

5757
log.SetFlags(0)
58-
log.SetOutput(ioutil.Discard)
58+
log.SetOutput(io.Discard)
5959
testStartTimeNano := time.Now().UnixNano()
6060

6161
var count = 0 // count real number of samples to compare with query result

Diff for: test/benchmark/common/config.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ package common
2121

2222
import (
2323
"fmt"
24-
"io/ioutil"
2524
"os"
2625
"path/filepath"
2726

@@ -90,7 +89,7 @@ func loadBenchmarkIngestConfigFromFile(benchConfigFile string) (*BenchmarkIngest
9089
benchConfigFile = filepath.Join(TsdbDefaultTestConfigPath, "tsdb-bench-test-config.yaml") // relative path
9190
}
9291

93-
configData, err := ioutil.ReadFile(benchConfigFile)
92+
configData, err := os.ReadFile(benchConfigFile)
9493
if err != nil {
9594
return nil, errors.Errorf("failed to load config from file %s", benchConfigFile)
9695
}

0 commit comments

Comments
 (0)