go/analysis/passes/modernize/testdata/src/minmax/userdefined/differentlogic/differentlogic.go
raw| 1 | package differentlogic |
| 2 | |
| 3 | // User-defined min with different logic - should NOT be removed |
| 4 | func min(a, b int) int { |
| 5 | return a + b // Completely different logic |
| 6 | } |
| 7 | |
| 8 | // Function with complex body that doesn't match pattern - should NOT be removed |
| 9 | func max(a, b int) int { |
| 10 | println("choosing min") |
| 11 | if a < b { |
| 12 | return a |
| 13 | } else { |
| 14 | return b |
| 15 | } |
| 16 | } |