Skip to content

Commit

Permalink
Ignore errcheck: error return value is not checked in `BenchmarkExist…
Browse files Browse the repository at this point in the history
…s` and `BenchmarkStat`

Signed-off-by: Jan Rodák <[email protected]>
  • Loading branch information
Honny1 committed Jul 8, 2024
1 parent e74a6ce commit 8c55737
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/fileutils/exists_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ func TestExist(t *testing.T) {
func BenchmarkExists(b *testing.B) {
tempDir := b.TempDir()
for i := 0; i < b.N; i++ {
Exists(tempDir)
Lexists(tempDir)
_ = Exists(tempDir)
_ = Lexists(tempDir)
}
}

func BenchmarkStat(b *testing.B) {
tempDir := b.TempDir()
for i := 0; i < b.N; i++ {
os.Stat(tempDir)
os.Lstat(tempDir)
_, _ = os.Stat(tempDir)
_, _ = os.Lstat(tempDir)
}
}

0 comments on commit 8c55737

Please sign in to comment.