MCPcopy
hub / github.com/tinylib/msgp / AppendMapStrIntf

Function AppendMapStrIntf

msgp/write_bytes.go:374–386  ·  view source on GitHub ↗

AppendMapStrIntf appends a map[string]interface{} to the slice as a MessagePack map with 'str'-type keys.

(b []byte, m map[string]any)

Source from the content-addressed store, hash-verified

372// AppendMapStrIntf appends a map[string]interface{} to the slice
373// as a MessagePack map with 'str'-type keys.
374func AppendMapStrIntf(b []byte, m map[string]any) ([]byte, error) {
375 sz := uint32(len(m))
376 b = AppendMapHeader(b, sz)
377 var err error
378 for key, val := range m {
379 b = AppendString(b, key)
380 b, err = AppendIntf(b, val)
381 if err != nil {
382 return b, err
383 }
384 }
385 return b, nil
386}
387
388// AppendIntf appends the concrete type of 'i' to the
389// provided []byte. 'i' must be one of the following:

Callers 1

AppendIntfFunction · 0.85

Calls 3

AppendMapHeaderFunction · 0.85
AppendStringFunction · 0.85
AppendIntfFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…