MCPcopy
hub / github.com/TarsCloud/TarsGo / WriteFloat64

Method WriteFloat64

tars/protocol/codec/codec.go:303–311  ·  view source on GitHub ↗

WriteFloat64 writes float64 with the tag.

(data float64, tag byte)

Source from the content-addressed store, hash-verified

301
302// WriteFloat64 writes float64 with the tag.
303func (b *Buffer) WriteFloat64(data float64, tag byte) error {
304 var err error
305 if err = b.WriteHead(DOUBLE, tag); err != nil {
306 return err
307 }
308
309 err = bWriteU64(b.buf, math.Float64bits(data))
310 return err
311}
312
313// WriteString writes string data with the tag.
314func (b *Buffer) WriteString(data string, tag byte) error {

Callers 2

TestBuffer_float64Function · 0.95
putBaseMethod · 0.80

Calls 2

WriteHeadMethod · 0.95
bWriteU64Function · 0.85

Tested by 1

TestBuffer_float64Function · 0.76