AsSlice returns the set as a sorted slice.
()
| 191 | |
| 192 | // AsSlice returns the set as a sorted slice. |
| 193 | func (s StringSorted) AsSlice() []string { |
| 194 | if s == nil { |
| 195 | return nil |
| 196 | } |
| 197 | keys := make([]string, 0, len(s)) |
| 198 | for k := range s { |
| 199 | keys = append(keys, k) |
| 200 | } |
| 201 | sort.Strings(keys) |
| 202 | return keys |
| 203 | } |
| 204 | |
| 205 | // DecodeMsg decodes the message from the reader. |
| 206 | func (s *StringSorted) DecodeMsg(reader *msgp.Reader) error { |
no outgoing calls