github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/pkg/util/slices/contains.go (about)

     1  package slices
     2  
     3  func StringContains(arr []string, searchValue string) bool {
     4  	for _, v := range arr {
     5  		if searchValue == v {
     6  			return true
     7  		}
     8  	}
     9  	return false
    10  }
    11  
    12  func IntContains(arr []int, searchValue int) bool {
    13  	for _, v := range arr {
    14  		if searchValue == v {
    15  			return true
    16  		}
    17  	}
    18  	return false
    19  }