Upgrade dependencies

This commit is contained in:
2021-01-17 19:00:46 +01:00
parent ee1ce9e0ae
commit 963220da41
123 changed files with 7786 additions and 3030 deletions

View File

@ -5,18 +5,15 @@ import (
"io"
)
//PubrelPacket is an internal representation of the fields of the
//Pubrel MQTT packet
// PubrelPacket is an internal representation of the fields of the
// Pubrel MQTT packet
type PubrelPacket struct {
FixedHeader
MessageID uint16
}
func (pr *PubrelPacket) String() string {
str := fmt.Sprintf("%s", pr.FixedHeader)
str += " "
str += fmt.Sprintf("MessageID: %d", pr.MessageID)
return str
return fmt.Sprintf("%s MessageID: %d", pr.FixedHeader, pr.MessageID)
}
func (pr *PubrelPacket) Write(w io.Writer) error {
@ -29,8 +26,8 @@ func (pr *PubrelPacket) Write(w io.Writer) error {
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
// Unpack decodes the details of a ControlPacket after the fixed
// header has been read
func (pr *PubrelPacket) Unpack(b io.Reader) error {
var err error
pr.MessageID, err = decodeUint16(b)
@ -38,8 +35,8 @@ func (pr *PubrelPacket) Unpack(b io.Reader) error {
return err
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
// Details returns a Details struct containing the Qos and
// MessageID of this ControlPacket
func (pr *PubrelPacket) Details() Details {
return Details{Qos: pr.Qos, MessageID: pr.MessageID}
}