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

Method DecodeString

decode_string.go:34–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34func (d *Decoder) DecodeString() (string, error) {
35 if intern := d.flags&useInternedStringsFlag != 0; intern || len(d.dict) > 0 {
36 return d.decodeInternedString(intern)
37 }
38
39 c, err := d.readCode()
40 if err != nil {
41 return "", err
42 }
43 return d.string(c)
44}
45
46func (d *Decoder) string(c byte) (string, error) {
47 n, err := d.bytesLen(c)

Callers 11

decodeStringSlicePtrMethod · 0.95
DecodeMapMethod · 0.95
TestInternedStringFunction · 0.95
TestResetDictFunction · 0.95
DecodeMethod · 0.95
TestDecodeCustomPayloadFunction · 0.80
decodeStringValueFunction · 0.80
DecodeDatastoreKeyFunction · 0.80

Calls 3

decodeInternedStringMethod · 0.95
readCodeMethod · 0.95
stringMethod · 0.95

Tested by 4

TestInternedStringFunction · 0.76
TestResetDictFunction · 0.76
TestDecodeCustomPayloadFunction · 0.64