AppendMapStrIntf appends a map[string]interface{} to the slice as a MessagePack map with 'str'-type keys.
(b []byte, m map[string]any)
| 372 | // AppendMapStrIntf appends a map[string]interface{} to the slice |
| 373 | // as a MessagePack map with 'str'-type keys. |
| 374 | func 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: |
no test coverage detected
searching dependent graphs…