(input []int)
| 508 | } |
| 509 | |
| 510 | func UniqueInts(input []int) []int { |
| 511 | seen := make(map[int]bool) |
| 512 | result := make([]int, 0, len(input)) |
| 513 | |
| 514 | for _, val := range input { |
| 515 | if !seen[val] { |
| 516 | seen[val] = true |
| 517 | result = append(result, val) |
| 518 | } |
| 519 | } |
| 520 | return result |
| 521 | } |
| 522 | |
| 523 | // StatusContain checks if a status matches any of the preset filters. |
| 524 | // Preset values < 100 are treated as prefix filters (e.g. 5 = 5xx, 51 = 51x). |