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

Method EncodeString

encode_slice.go:67–72  ·  view source on GitHub ↗
(v string)

Source from the content-addressed store, hash-verified

65}
66
67func (e *Encoder) EncodeString(v string) error {
68 if intern := e.flags&useInternedStringsFlag != 0; intern || len(e.dict) > 0 {
69 return e.encodeInternedString(v, intern)
70 }
71 return e.encodeNormalString(v)
72}
73
74func (e *Encoder) encodeNormalString(v string) error {
75 if err := e.encodeStringLen(len(v)); err != nil {

Callers 14

EncodeMapMethod · 0.95
EncodeMapSortedMethod · 0.95
TestInternedStringFunction · 0.95
TestResetDictFunction · 0.95
EncodeMethod · 0.95
encodeStringSliceMethod · 0.95
encodeErrorValueFunction · 0.80
encodeMapStringBoolValueFunction · 0.80
encodeStructValueFunction · 0.80

Calls 2

encodeInternedStringMethod · 0.95
encodeNormalStringMethod · 0.95

Tested by 2

TestInternedStringFunction · 0.76
TestResetDictFunction · 0.76