Files
projectdiscovery-httpx/common/slice/slice.go
T
2020-09-14 02:06:35 +02:00

21 lines
373 B
Go

package slice
// IntSliceContains check if a slice contains the specified int value
func IntSliceContains(sl []int, v int) bool {
for _, vv := range sl {
if vv == v {
return true
}
}
return false
}
// ToSlice creates a slice with all string keys from a map
func ToSlice(m map[string]struct{}) (s []string) {
for k := range m {
s = append(s, k)
}
return
}