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

Method SetSortMapKeys

encode.go:137–144  ·  view source on GitHub ↗

SetSortMapKeys causes the Encoder to encode map keys in increasing order. Supported map types are: - map[string]string - map[string]bool - map[string]interface{}

(on bool)

Source from the content-addressed store, hash-verified

135// - map[string]bool
136// - map[string]interface{}
137func (e *Encoder) SetSortMapKeys(on bool) *Encoder {
138 if on {
139 e.flags |= sortMapKeysFlag
140 } else {
141 e.flags &= ^sortMapKeysFlag
142 }
143 return e
144}
145
146// SetCustomStructTag causes the Encoder to use a custom struct tag as
147// fallback option if there is no msgpack tag.

Callers 2

TestEncoderFunction · 0.95
TestSetSortMapKeysFunction · 0.95

Calls

no outgoing calls

Tested by 2

TestEncoderFunction · 0.76
TestSetSortMapKeysFunction · 0.76