Creates a new Set from an array of strings.
(names []string)
| 21 | |
| 22 | // Creates a new Set from an array of strings. |
| 23 | func SetFromArray(names []string) Set { |
| 24 | result := make(Set, len(names)) |
| 25 | for _, name := range names { |
| 26 | result[name] = present{} |
| 27 | } |
| 28 | return result |
| 29 | } |
| 30 | |
| 31 | // Creates a new Set from zero or more inline string arguments. |
| 32 | func SetOf(names ...string) Set { |
no outgoing calls