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"
)
//UnsubackPacket is an internal representation of the fields of the
//Unsuback MQTT packet
// UnsubackPacket is an internal representation of the fields of the
// Unsuback MQTT packet
type UnsubackPacket struct {
FixedHeader
MessageID uint16
}
func (ua *UnsubackPacket) String() string {
str := fmt.Sprintf("%s", ua.FixedHeader)
str += " "
str += fmt.Sprintf("MessageID: %d", ua.MessageID)
return str
return fmt.Sprintf("%s MessageID: %d", ua.FixedHeader, ua.MessageID)
}
func (ua *UnsubackPacket) Write(w io.Writer) error {
@ -29,8 +26,8 @@ func (ua *UnsubackPacket) 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 (ua *UnsubackPacket) Unpack(b io.Reader) error {
var err error
ua.MessageID, err = decodeUint16(b)
@ -38,8 +35,8 @@ func (ua *UnsubackPacket) 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 (ua *UnsubackPacket) Details() Details {
return Details{Qos: 0, MessageID: ua.MessageID}
}