StrSliceHasItem checks item for presence in slice
(s []string, item string)
| 56 | |
| 57 | // StrSliceHasItem checks item for presence in slice |
| 58 | func StrSliceHasItem(s []string, item string) bool { |
| 59 | for _, v := range s { |
| 60 | if v == item { |
| 61 | return true |
| 62 | } |
| 63 | } |
| 64 | return false |
| 65 | } |
| 66 | |
| 67 | // StrMapSortedKeys returns keys of map[string]string sorted |
| 68 | func StrMapSortedKeys(m map[string]string) []string { |
no outgoing calls