blob: 3911c1dc936fe17c14b8abd7f4be4874938d87d8 [file]
package nonstrict
// min with <= operator - should be detected and removed
func min(a, b int) int { // want "user-defined min function is equivalent to built-in min and can be removed"
if a <= b {
return a
} else {
return b
}
}
// max with >= operator - should be detected and removed
func max(a, b int) int { // want "user-defined max function is equivalent to built-in max and can be removed"
if a >= b {
return a
}
return b
}