Skip to content

Commit

Permalink
Fix lint error (#37294)
Browse files Browse the repository at this point in the history
  • Loading branch information
constanca-m authored Dec 5, 2023
1 parent d533d8f commit 26bbb77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions metricbeat/helper/kubernetes/ktest/ktest.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ import (
)

func getFiles(folder string) ([]string, error) {
var files []string
entries, err := os.ReadDir(folder)
files := make([]string, len(entries))
if err != nil {
return nil, err
}
for _, e := range entries {
files = append(files, filepath.Join(folder, e.Name()))
for i, e := range entries {
files[i] = filepath.Join(folder, e.Name())
}
return files, nil
}
Expand Down

0 comments on commit 26bbb77

Please sign in to comment.