INNER CODE UNIT · Go
IfPresentInSlice
deepfence/FlowMeter · pkg/common/common.go:115
func IfPresentInSlice(slice []int, val int) (int, bool) {
for i, item := range slice {
if item == val {
return i, true
}
}
return -1, false
}
INNER CODE UNIT · Go
deepfence/FlowMeter · pkg/common/common.go:115
func IfPresentInSlice(slice []int, val int) (int, bool) {
for i, item := range slice {
if item == val {
return i, true
}
}
return -1, false
}