From ece687263025cc7b933e8d72fba9b458fea496e4 Mon Sep 17 00:00:00 2001 From: Eng Zer Jun Date: Thu, 7 Nov 2024 00:22:37 +0800 Subject: [PATCH] Replace min/max helpers with built-in min/max 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 --- gmeasure/table/table.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/gmeasure/table/table.go b/gmeasure/table/table.go index f980b9c7a..c65dcaf98 100644 --- a/gmeasure/table/table.go +++ b/gmeasure/table/table.go @@ -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 -}