HasString returns whether the slice contains the given string.
(a []string, b string)
| 672 | |
| 673 | // HasString returns whether the slice contains the given string. |
| 674 | func HasString(a []string, b string) bool { |
| 675 | for _, k := range a { |
| 676 | if k == b { |
| 677 | return true |
| 678 | } |
| 679 | } |
| 680 | return false |
| 681 | } |
| 682 | |
| 683 | // Unique takes an array and returns it with no duplicate entries. |
| 684 | func Unique(a []string) []string { |
no outgoing calls
no test coverage detected