MapIndex returns the index of the given map, or -1 if the map does not belong to the API.
(t *Map)
| 147 | // MapIndex returns the index of the given map, or -1 if the map does not belong |
| 148 | // to the API. |
| 149 | func (a *API) MapIndex(t *Map) int { |
| 150 | for i, m := range a.Maps { |
| 151 | if m == t { |
| 152 | return i |
| 153 | } |
| 154 | } |
| 155 | return -1 |
| 156 | } |
| 157 | |
| 158 | // SliceIndex returns the index of the given slice, or -1 if the slice does not |
| 159 | // belong to the API. |
no outgoing calls
no test coverage detected