MCPcopy Index your code
hub / github.com/vmihailenco/msgpack / encodeStringSlice

Method encodeStringSlice

encode_slice.go:106–119  ·  view source on GitHub ↗
(s []string)

Source from the content-addressed store, hash-verified

104}
105
106func (e *Encoder) encodeStringSlice(s []string) error {
107 if s == nil {
108 return e.EncodeNil()
109 }
110 if err := e.EncodeArrayLen(len(s)); err != nil {
111 return err
112 }
113 for _, v := range s {
114 if err := e.EncodeString(v); err != nil {
115 return err
116 }
117 }
118 return nil
119}
120
121func encodeSliceValue(e *Encoder, v reflect.Value) error {
122 if v.IsNil() {

Callers 1

encodeStringSliceValueFunction · 0.80

Calls 3

EncodeNilMethod · 0.95
EncodeArrayLenMethod · 0.95
EncodeStringMethod · 0.95

Tested by

no test coverage detected