Skip to content

Commit 2dfb002

Browse files
committed
Declare min function for better compatibility
1 parent 6cdcca8 commit 2dfb002

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

utils.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ func formatHelpRow(head, content string, bareHeadLength, maxHeadLength, terminal
2424
// length of a single content row, constant
2525
contentRowLen := terminalWidth - maxHeadLength
2626

27+
min := func(x, y int) int {
28+
if x < y {
29+
return x
30+
} else {
31+
return y
32+
}
33+
}
34+
2735
var rows []string
2836
if withBreak && maxHeadLength < bareHeadLength {
2937
rows = append(rows, head)

0 commit comments

Comments
 (0)