New creates and initializes a new Set.
(ts ...string)
| 31 | |
| 32 | // New creates and initializes a new Set. |
| 33 | func New(ts ...string) Set { |
| 34 | s := make(Set) |
| 35 | s.Add(ts...) |
| 36 | return s |
| 37 | } |
| 38 | |
| 39 | func FromSlice(items []string) Set { |
| 40 | return New(items...) |