MCPcopy Index your code
hub / github.com/tinylib/msgp / EncodeMsg

Method EncodeMsg

msgp/setof/generated.go:3426–3441  ·  view source on GitHub ↗

EncodeMsg encodes the message to the writer.

(writer *msgp.Writer)

Source from the content-addressed store, hash-verified

3424
3425// EncodeMsg encodes the message to the writer.
3426func (s Float64) EncodeMsg(writer *msgp.Writer) error {
3427 if s == nil {
3428 return writer.WriteNil()
3429 }
3430 err := writer.WriteArrayHeader(uint32(len(s)))
3431 if err != nil {
3432 return err
3433 }
3434 for k := range s {
3435 err = writer.WriteFloat(k)
3436 if err != nil {
3437 return err
3438 }
3439 }
3440 return nil
3441}
3442
3443// MarshalMsg encodes the message to the bytes.
3444func (s Float64) MarshalMsg(bytes []byte) ([]byte, error) {

Callers 1

TestFloat64_NilHandlingFunction · 0.95

Calls 3

WriteNilMethod · 0.80
WriteArrayHeaderMethod · 0.80
WriteFloatMethod · 0.80

Tested by 1

TestFloat64_NilHandlingFunction · 0.76