StringFromSlice creates a String from a slice.
(s []string)
| 130 | |
| 131 | // StringFromSlice creates a String from a slice. |
| 132 | func StringFromSlice(s []string) String { |
| 133 | if s == nil { |
| 134 | return nil |
| 135 | } |
| 136 | dst := make(String, len(s)) |
| 137 | for _, v := range s { |
| 138 | dst[v] = struct{}{} |
| 139 | } |
| 140 | return dst |
| 141 | } |
| 142 | |
| 143 | // StringSorted is a set of strings that will be stored as an array. |
| 144 | // Elements are sorted and the order of elements is guaranteed. |
no outgoing calls
searching dependent graphs…