Skip to content

Commit

Permalink
Replace min/max helpers with built-in min/max
Browse files Browse the repository at this point in the history
We can use the built-in `min` and `max` functions since Go 1.21.

Reference: https://go.dev/ref/spec#Min_and_max
Signed-off-by: Eng Zer Jun <[email protected]>
  • Loading branch information
Juneezee authored and onsi committed Nov 15, 2024
1 parent 8e924d7 commit ece6872
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions gmeasure/table/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,16 +355,3 @@ func sum(s []int) int {
return out
}

func min(a int, b int) int {
if a < b {
return a
}
return b
}

func max(a int, b int) int {
if a > b {
return a
}
return b
}

0 comments on commit ece6872

Please sign in to comment.