contains is a case insensitive match, finding needle in a haystack
(haystack []string, needle string)
| 117 | |
| 118 | // contains is a case insensitive match, finding needle in a haystack |
| 119 | func contains(haystack []string, needle string) bool { |
| 120 | for _, a := range haystack { |
| 121 | if strings.EqualFold(a, needle) { |
| 122 | return true |
| 123 | } |
| 124 | } |
| 125 | return false |
| 126 | } |
| 127 | |
| 128 | // Verify optional parameters are of the correct type. |
| 129 | func typeCheckParameter(obj interface{}, expected string, name string) error { |
no outgoing calls
no test coverage detected