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

Method UseInternedStrings

encode.go:191–197  ·  view source on GitHub ↗

UseInternedStrings causes the Encoder to intern strings.

(on bool)

Source from the content-addressed store, hash-verified

189
190// UseInternedStrings causes the Encoder to intern strings.
191func (e *Encoder) UseInternedStrings(on bool) {
192 if on {
193 e.flags |= useInternedStringsFlag
194 } else {
195 e.flags &= ^useInternedStringsFlag
196 }
197}
198
199func (e *Encoder) Encode(v interface{}) error {
200 switch v := v.(type) {

Callers 1

TestInternedStringFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestInternedStringFunction · 0.76