Iter() returns a channel of type string that you can range over.
()
| 136 | |
| 137 | // Iter() returns a channel of type string that you can range over. |
| 138 | func (set StringSet) Iter() <-chan string { |
| 139 | ch := make(chan string) |
| 140 | go func() { |
| 141 | for elem := range set { |
| 142 | ch <- elem |
| 143 | } |
| 144 | close(ch) |
| 145 | }() |
| 146 | |
| 147 | return ch |
| 148 | } |
| 149 | |
| 150 | // Equal determines if two sets are equal to each other. |
| 151 | // If they both are the same size and have the same items they are considered equal. |
no outgoing calls