MCPcopy
hub / github.com/pingcap/tidb / appendZero

Function appendZero

pkg/types/json_binary.go:729–740  ·  view source on GitHub ↗
(buf []byte, length int)

Source from the content-addressed store, hash-verified

727}
728
729func appendZero(buf []byte, length int) []byte {
730 var tmp [8]byte
731 rem := length % 8
732 loop := length / 8
733 for i := 0; i < loop; i++ {
734 buf = append(buf, tmp[:]...)
735 }
736 for i := 0; i < rem; i++ {
737 buf = append(buf, 0)
738 }
739 return buf
740}
741
742func appendUint32(buf []byte, v uint32) []byte {
743 var tmp [4]byte

Callers 7

appendBinaryStringFunction · 0.85
appendBinaryOpaqueFunction · 0.85
appendBinaryFloat64Function · 0.85
appendBinaryUint64Function · 0.85
appendBinaryUint32Function · 0.85
appendBinaryArrayFunction · 0.85
appendBinaryObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected