Grammar fixes

This commit is contained in:
Zoltán Papp
2024-08-06 17:25:51 +02:00
parent ad75c9f31a
commit f08bf93b19
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ func (isf *internalStopFlag) isSet() bool {
return isf.stop
}
// Msg carry the payload from the server to the client. With this sturct, the net.Conn can free the buffer.
// Msg carry the payload from the server to the client. With this struct, the net.Conn can free the buffer.
type Msg struct {
Payload []byte
+1 -1
View File
@@ -111,7 +111,7 @@ func MarshalHelloMsg(peerID []byte, additions []byte) ([]byte, error) {
// authenticate the client with the server.
func UnmarshalHelloMsg(msg []byte) ([]byte, []byte, error) {
if len(msg) < headerSizeHello {
return nil, nil, fmt.Errorf("invalid 'hello' messge")
return nil, nil, fmt.Errorf("invalid 'hello' message")
}
if !bytes.Equal(msg[1:5], magicHeader) {
return nil, nil, fmt.Errorf("invalid magic header")