Skip to content

Commit

Permalink
test: avoid linter warning
Browse files Browse the repository at this point in the history
Recent golangci-lint warns about shadowing the print function.
  • Loading branch information
pohly committed Nov 21, 2024
1 parent 7f02688 commit be376ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,10 +543,10 @@ func Output(t *testing.T, config OutputConfig) {
t.Run(n, func(t *testing.T) {
initPrintWithKlog(t, test)

testOutput := func(t *testing.T, expectedLine int, print func(buffer *bytes.Buffer)) {
testOutput := func(t *testing.T, expectedLine int, logToBuffer func(buffer *bytes.Buffer)) {
var tmpWriteBuffer bytes.Buffer
klog.SetOutput(&tmpWriteBuffer)
print(&tmpWriteBuffer)
logToBuffer(&tmpWriteBuffer)
klog.Flush()

actual := tmpWriteBuffer.String()
Expand Down

0 comments on commit be376ee

Please sign in to comment.