(w encoding.Writer)
| 25 | } |
| 26 | |
| 27 | func (c *SignedChatCommand) Encode(w encoding.Writer) error { |
| 28 | if err := w.String(c.Command); err != nil { |
| 29 | return err |
| 30 | } |
| 31 | if err := w.Long(c.Timestamp); err != nil { |
| 32 | return err |
| 33 | } |
| 34 | if err := w.Long(c.Salt); err != nil { |
| 35 | return err |
| 36 | } |
| 37 | if err := w.VarInt(int32(len(c.Arguments))); err != nil { |
| 38 | return err |
| 39 | } |
| 40 | for _, arg := range c.Arguments { |
| 41 | if err := w.String(arg.Name); err != nil { |
| 42 | return err |
| 43 | } |
| 44 | if err := w.FixedByteArray(arg.Signature[:]); err != nil { |
| 45 | return err |
| 46 | } |
| 47 | } |
| 48 | if err := w.VarInt(c.MessageCount); err != nil { |
| 49 | return err |
| 50 | } |
| 51 | return w.FixedBitSet(c.Acknowledged) |
| 52 | } |
| 53 | |
| 54 | func (c *SignedChatCommand) Decode(r encoding.Reader) error { |
| 55 | if err := r.String(&c.Command); err != nil { |
nothing calls this directly
no test coverage detected