MCPcopy
hub / github.com/tinylib/msgp / AsSlice

Method AsSlice

msgp/setof/generated.go:193–203  ·  view source on GitHub ↗

AsSlice returns the set as a sorted slice.

()

Source from the content-addressed store, hash-verified

191
192// AsSlice returns the set as a sorted slice.
193func (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.
206func (s *StringSorted) DecodeMsg(reader *msgp.Reader) error {

Callers 1

Calls

no outgoing calls

Tested by 1