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

@ -6,8 +6,8 @@ import (
"io"
)
//SubackPacket is an internal representation of the fields of the
//Suback MQTT packet
// SubackPacket is an internal representation of the fields of the
// Suback MQTT packet
type SubackPacket struct {
FixedHeader
MessageID uint16
@ -15,10 +15,7 @@ type SubackPacket struct {
}
func (sa *SubackPacket) String() string {
str := fmt.Sprintf("%s", sa.FixedHeader)
str += " "
str += fmt.Sprintf("MessageID: %d", sa.MessageID)
return str
return fmt.Sprintf("%s MessageID: %d", sa.FixedHeader, sa.MessageID)
}
func (sa *SubackPacket) Write(w io.Writer) error {
@ -34,8 +31,8 @@ func (sa *SubackPacket) 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 (sa *SubackPacket) Unpack(b io.Reader) error {
var qosBuffer bytes.Buffer
var err error
@ -53,8 +50,8 @@ func (sa *SubackPacket) Unpack(b io.Reader) error {
return nil
}
//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 (sa *SubackPacket) Details() Details {
return Details{Qos: 0, MessageID: sa.MessageID}
}