mirror of
https://github.com/projectdiscovery/httpx.git
synced 2024-11-28 22:01:28 +03:00
e2b0c1683b
* Add hashes flag, to support multi body hash type. issue:489 and issue:488 * go mod update * Add hash type validate for -hash flag Co-authored-by: sandeep <sandeep@projectdiscovery.io> Co-authored-by: mzack <marco.rivoli.nvh@gmail.com>
41 lines
786 B
Go
41 lines
786 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
|
|
}
|
|
|
|
// UIntSliceContains check if a slice contains the specified uint value
|
|
func UInt32SliceContains(sl []uint32, v uint32) bool {
|
|
for _, vv := range sl {
|
|
if vv == v {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
// StringSliceContains check if a slice contains the specified int value
|
|
func StringSliceContains(sl []string, v string) 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
|
|
}
|