Skip to content

Commit d9c8825

Browse files
committed
linter fixes
1 parent a43b03c commit d9c8825

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

pkg/github/actions_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,8 +1251,8 @@ func Test_MemoryUsage_SlidingWindow_vs_NoWindow(t *testing.T) {
12511251
if err != nil {
12521252
return 0, 0, err
12531253
}
1254-
defer resp1.Body.Close() //nolint:bodyclose // Response body is closed in downloadLogContent, but we need to return httpResp
1255-
content, totalLines, _, err := buffer.ProcessResponseAsRingBufferToEnd(resp1, bufferSize)
1254+
defer resp1.Body.Close() //nolint:bodyclose // Response body is closed in downloadLogContent, but we need to return httpResp
1255+
content, totalLines, _, err := buffer.ProcessResponseAsRingBufferToEnd(resp1, bufferSize) //nolint:bodyclose
12561256
return totalLines, int64(len(content)), err
12571257
})
12581258
require.NoError(t, err1)

pkg/profiler/profiler.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ func safeMemoryDelta(after, before uint64) int64 {
4444
return math.MaxInt64
4545
}
4646
return int64(diff)
47-
} else {
48-
diff := before - after
49-
if diff > math.MaxInt64 {
50-
return -math.MaxInt64
51-
}
52-
return -int64(diff)
5347
}
48+
diff := before - after
49+
if diff > math.MaxInt64 {
50+
return -math.MaxInt64
51+
}
52+
return -int64(diff)
5453
}
5554

5655
return int64(after) - int64(before)

0 commit comments

Comments
 (0)