FindString returns index of string if in list, else -1
(str string, strs []string)
| 148 | |
| 149 | // FindString returns index of string if in list, else -1 |
| 150 | func FindString(str string, strs []string) int { |
| 151 | for i, s := range strs { |
| 152 | if str == s { |
| 153 | return i |
| 154 | } |
| 155 | } |
| 156 | return -1 |
| 157 | } |
| 158 | |
| 159 | // AddInstanceExt adds given extension(s), only if not already set |
| 160 | // returns true if added. |
no outgoing calls
no test coverage detected