MCPcopy
hub / github.com/redis/go-redis / readReply

Method readReply

timeseries_commands.go:581–604  ·  view source on GitHub ↗
(rd *proto.Reader)

Source from the content-addressed store, hash-verified

579}
580
581func (cmd *TSTimestampValueCmd) readReply(rd *proto.Reader) (err error) {
582 n, err := rd.ReadMapLen()
583 if err != nil {
584 return err
585 }
586 cmd.val = TSTimestampValue{}
587 for i := 0; i < n; i++ {
588 timestamp, err := rd.ReadInt()
589 if err != nil {
590 return err
591 }
592 value, err := rd.ReadString()
593 if err != nil {
594 return err
595 }
596 cmd.val.Timestamp = timestamp
597 cmd.val.Value, err = util.ParseStringToFloat(value)
598 if err != nil {
599 return err
600 }
601 }
602
603 return nil
604}
605
606func (cmd *TSTimestampValueCmd) Clone() Cmder {
607 val := cmd.val

Callers

nothing calls this directly

Calls 4

ParseStringToFloatFunction · 0.92
ReadMapLenMethod · 0.80
ReadIntMethod · 0.80
ReadStringMethod · 0.80

Tested by

no test coverage detected