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

Method WriteStringIntMap

go/fory/writer.go:500–512  ·  view source on GitHub ↗

WriteStringIntMap writes map[string]int with ref/type info

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

Source from the content-addressed store, hash-verified

498
499// WriteStringIntMap writes map[string]int with ref/type info
500func (c *WriteContext) WriteStringIntMap(value map[string]int, refMode RefMode, writeTypeInfo bool) {
501 if refMode != RefModeNone {
502 if value == nil {
503 c.buffer.WriteInt8(NullFlag)
504 return
505 }
506 c.buffer.WriteInt8(NotNullValueFlag)
507 }
508 if writeTypeInfo {
509 c.WriteTypeId(MAP)
510 }
511 writeMapStringInt(c.buffer, value, false)
512}
513
514// WriteStringFloat64Map writes map[string]float64 with ref/type info
515func (c *WriteContext) WriteStringFloat64Map(value map[string]float64, refMode RefMode, writeTypeInfo bool) {

Callers 1

writeRemainingFieldMethod · 0.80

Calls 3

WriteTypeIdMethod · 0.95
writeMapStringIntFunction · 0.85
WriteInt8Method · 0.45

Tested by

no test coverage detected