Skip to content

Commit 28dac59

Browse files
committed
Don't shadow builtin max
1 parent 1eb5fc0 commit 28dac59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

assert/assertions.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,9 @@ func formatUnequalValues(expected, actual interface{}) (e string, a string) {
622622
func truncatingFormat(format string, data interface{}) string {
623623
value := fmt.Sprintf(format, data)
624624
// Give us space for two truncated objects and the surrounding sentence.
625-
max := bufio.MaxScanTokenSize/2 - 100
626-
if len(value) > max {
627-
value = value[0:max] + "<... truncated>"
625+
maxMessageSize := bufio.MaxScanTokenSize/2 - 100
626+
if len(value) > maxMessageSize {
627+
value = value[0:maxMessageSize] + "<... truncated>"
628628
}
629629
return value
630630
}

0 commit comments

Comments
 (0)