You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
190 B

9 years ago
  1. package common
  2. // IntInSlice returns true if a is found in the list.
  3. func IntInSlice(a int, list []int) bool {
  4. for _, b := range list {
  5. if b == a {
  6. return true
  7. }
  8. }
  9. return false
  10. }