MCPcopy Create free account
hub / github.com/apache/fory / WriteStringInt32Map

Method WriteStringInt32Map

go/fory/writer.go:485–497  ·  view source on GitHub ↗

WriteStringInt32Map writes map[string]int32 with ref/type info

(value map[string]int32, refMode RefMode, writeTypeInfo bool)

Source from the content-addressed store, hash-verified

483
484// WriteStringInt32Map writes map[string]int32 with ref/type info
485func (c *WriteContext) WriteStringInt32Map(value map[string]int32, refMode RefMode, writeTypeInfo bool) {
486 if refMode != RefModeNone {
487 if value == nil {
488 c.buffer.WriteInt8(NullFlag)
489 return
490 }
491 c.buffer.WriteInt8(NotNullValueFlag)
492 }
493 if writeTypeInfo {
494 c.WriteTypeId(MAP)
495 }
496 writeMapStringInt32(c.buffer, value, false)
497}
498
499// WriteStringIntMap writes map[string]int with ref/type info
500func (c *WriteContext) WriteStringIntMap(value map[string]int, refMode RefMode, writeTypeInfo bool) {

Callers 1

writeRemainingFieldMethod · 0.80

Calls 3

WriteTypeIdMethod · 0.95
writeMapStringInt32Function · 0.85
WriteInt8Method · 0.45

Tested by

no test coverage detected