From 1d304334dddca5c6e8b32ce090fac35218b11b87 Mon Sep 17 00:00:00 2001 From: Eng Zer Jun Date: Thu, 6 Mar 2025 21:39:36 +0800 Subject: [PATCH] pkg/util: remove redundant min/max helper functions 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 --- pkg/util/utils.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pkg/util/utils.go b/pkg/util/utils.go index 00c2d19073..5f26464aec 100644 --- a/pkg/util/utils.go +++ b/pkg/util/utils.go @@ -428,20 +428,6 @@ func parseTriple(spec []string, parentMapping []ruser.IDMap, mapSetting string) return mappings, flags, nil } -func min(a, b int) int { - if a < b { - return a - } - return b -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} - // Remove any conflicting mapping from mapping present in extension, so // extension can be appended to mapping without conflicts. // Returns the resulting mapping, with extension appended to it.