MCPcopy Create free account
hub / github.com/chainreactors/spray / UniqueInts

Function UniqueInts

pkg/utils.go:510–521  ·  view source on GitHub ↗
(input []int)

Source from the content-addressed store, hash-verified

508}
509
510func 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).

Callers 1

ParseStatusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected