From a94881f1d404ace4f0b9e34c84670bcc35003639 Mon Sep 17 00:00:00 2001 From: bad Date: Sun, 17 Oct 2021 21:27:17 +0200 Subject: [PATCH] Add misspell --- .golangci.toml | 4 ++++ session/Session.go | 2 +- session/connection.go | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .golangci.toml diff --git a/.golangci.toml b/.golangci.toml new file mode 100644 index 0000000..c85613d --- /dev/null +++ b/.golangci.toml @@ -0,0 +1,4 @@ +[linters] +enable = [ + "misspell" +] diff --git a/session/Session.go b/session/Session.go index a7c23ac..40404a6 100644 --- a/session/Session.go +++ b/session/Session.go @@ -65,7 +65,7 @@ func (s *Session) Connect(req ConnectionRequest) { } } -// Starts a loop the recieves and responds to packets +// Starts a loop the receives and responds to packets func (s *Session) HandlerLoop() { go s.Connection.PacketReadLoop() for s.Connection != nil { diff --git a/session/connection.go b/session/connection.go index eb9ae1a..ce5f15b 100644 --- a/session/connection.go +++ b/session/connection.go @@ -73,12 +73,12 @@ func NewConnection(rw io.ReadWriteCloser) (ConnectionRequest, error) { packet, err := conn.readPacket() conPack, isConn := (*packet).(packets.ConnectPacket) if !isConn { - log.Println("Didn't recieve a connect packet") + log.Println("Didn't receive a connect packet") err := packets.DisconnectPacket{ ReasonCode: packets.DisconnectReasonCodeProtocolError, }.Write(rw) if err != nil { - log.Println("Failed to disconnect after not recieving a connect packet", err) + log.Println("Failed to disconnect after not receiving a connect packet", err) } return connReq, FirstPackNotConnect }