build: upgrade to go 1.17 and dependencies

This commit is contained in:
2021-09-01 22:26:03 +02:00
parent d0f83c8e56
commit 9a10e0fffb
461 changed files with 79514 additions and 99238 deletions

View File

@ -5,18 +5,15 @@ import (
"io"
)
//PubrecPacket is an internal representation of the fields of the
//Pubrec MQTT packet
// PubrecPacket is an internal representation of the fields of the
// Pubrec MQTT packet
type PubrecPacket struct {
FixedHeader
MessageID uint16
}
func (pr *PubrecPacket) 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 *PubrecPacket) Write(w io.Writer) error {
@ -29,8 +26,8 @@ func (pr *PubrecPacket) 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 *PubrecPacket) Unpack(b io.Reader) error {
var err error
pr.MessageID, err = decodeUint16(b)
@ -38,8 +35,8 @@ func (pr *PubrecPacket) 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 *PubrecPacket) Details() Details {
return Details{Qos: pr.Qos, MessageID: pr.MessageID}
}