Fixed linter issues

Signed-off-by: Marco Pracucci <marco@pracucci.com>
This commit is contained in:
Marco Pracucci 2021-11-03 10:35:29 +01:00
parent 229575de0c
commit 56f926c62c
No known key found for this signature in database
GPG key ID: 74C1BD403D2DF9B5
3 changed files with 3 additions and 4 deletions

View file

@ -650,8 +650,8 @@ func TestCompaction_CompactEmptyBlocks(t *testing.T) {
} }
bdir := filepath.Join(dir, id.String()) bdir := filepath.Join(dir, id.String())
require.NoError(t, os.Mkdir(bdir, 0777)) require.NoError(t, os.Mkdir(bdir, 0o777))
require.NoError(t, os.Mkdir(chunkDir(bdir), 0777)) require.NoError(t, os.Mkdir(chunkDir(bdir), 0o777))
_, err := writeMetaFile(log.NewNopLogger(), bdir, m) _, err := writeMetaFile(log.NewNopLogger(), bdir, m)
require.NoError(t, err) require.NoError(t, err)

View file

@ -169,7 +169,7 @@ func BenchmarkQuerierSelect(b *testing.B) {
} }
require.NoError(b, app.Commit()) require.NoError(b, app.Commit())
bench := func(b *testing.B, br BlockReader, sorted bool, sharding bool) { bench := func(b *testing.B, br BlockReader, sorted, sharding bool) {
matcher := labels.MustNewMatcher(labels.MatchEqual, "foo", "bar") matcher := labels.MustNewMatcher(labels.MatchEqual, "foo", "bar")
for s := 1; s <= numSeries; s *= 10 { for s := 1; s <= numSeries; s *= 10 {
b.Run(fmt.Sprintf("%dof%d", s, numSeries), func(b *testing.B) { b.Run(fmt.Sprintf("%dof%d", s, numSeries), func(b *testing.B) {

View file

@ -257,7 +257,6 @@ func openFiles(filenames []string) ([]*os.File, error) {
for _, fn := range filenames { for _, fn := range filenames {
f, err := os.Open(fn) f, err := os.Open(fn)
if err != nil { if err != nil {
// Close files opened so far. // Close files opened so far.
for _, sf := range result { for _, sf := range result {