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

Method AsSlice

msgp/setof/generated.go:51–60  ·  view source on GitHub ↗

AsSlice returns the set as a slice.

()

Source from the content-addressed store, hash-verified

49
50// AsSlice returns the set as a slice.
51func (s String) AsSlice() []string {
52 if s == nil {
53 return nil
54 }
55 dst := make([]string, 0, len(s))
56 for k := range s {
57 dst = append(dst, k)
58 }
59 return dst
60}
61
62// DecodeMsg decodes the message from the reader.
63func (s *String) DecodeMsg(reader *msgp.Reader) error {

Callers 1

TestString_NilHandlingFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestString_NilHandlingFunction · 0.76