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 <engzerjun@gmail.com>
This commit is contained in:
Eng Zer Jun
2025-03-06 21:39:36 +08:00
parent faf8574bb4
commit 1d304334dd

View File

@ -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.