mirror of
https://github.com/containers/podman.git
synced 2025-08-24 10:04:57 +08:00
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:
@ -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.
|
||||
|
Reference in New Issue
Block a user