From a6e336e0067a9bc37881e1c29cbfcdebcdb01a2b Mon Sep 17 00:00:00 2001 From: Yang Hau Date: Tue, 10 Dec 2024 01:21:44 +0100 Subject: [PATCH] fix typos --- async/group.go | 2 +- rfc822/scanner.go | 4 ++-- tests/recovery_mailbox_test.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/async/group.go b/async/group.go index 3e3d4b5e..5409d862 100644 --- a/async/group.go +++ b/async/group.go @@ -9,7 +9,7 @@ import ( // Group is forked and improved version of "github.com/bradenaw/juniper/xsync.Group". // -// It manages a group of goroutines. The main change to original is posibility +// It manages a group of goroutines. The main change to original is possibility // to wait passed function to finish without canceling it's context and adding // PanicHandler. type Group struct { diff --git a/rfc822/scanner.go b/rfc822/scanner.go index c69c89fb..acf46891 100644 --- a/rfc822/scanner.go +++ b/rfc822/scanner.go @@ -112,7 +112,7 @@ func (s *ByteScanner) readToBoundary() ([]byte, bool) { // It can happen that this boundary is at the end of the file/message with no new line. if len(afterBoundary) != 0 { newLineStartIndex = indexOfNewLineAfterBoundary(afterBoundary) - // If there is no new line this can't be a boundary pattern. RFC 1341 states that tey are + // If there is no new line this can't be a boundary pattern. RFC 1341 states that they are // immediately followed by either \r\n or \n. if newLineStartIndex < 0 { s.progress += index + boundaryLen + boundarySuffixLen @@ -133,7 +133,7 @@ func (s *ByteScanner) readToBoundary() ([]byte, bool) { afterBoundary := remaining[lineEndIndex:] newLineStart := indexOfNewLineAfterBoundary(afterBoundary) - // If there is no new line this can't be a boundary pattern. RFC 1341 states that tey are + // If there is no new line this can't be a boundary pattern. RFC 1341 states that they are // immediately followed by either \r\n or \n. if newLineStart < 0 { s.progress += index + boundaryLen diff --git a/tests/recovery_mailbox_test.go b/tests/recovery_mailbox_test.go index 54ca98d4..1b5a7fd2 100644 --- a/tests/recovery_mailbox_test.go +++ b/tests/recovery_mailbox_test.go @@ -572,7 +572,7 @@ func (r *sizeExceededAppendConnector) CreateMessage( _ []byte, _ imap.FlagSet, _ time.Time) (imap.Message, []byte, error) { - return imap.Message{}, nil, fmt.Errorf("messsage to large: %w", connector.ErrMessageSizeExceedsLimits) + return imap.Message{}, nil, fmt.Errorf("message to large: %w", connector.ErrMessageSizeExceedsLimits) } func (r *sizeExceededAppendConnector) AddMessagesToMailbox( @@ -581,7 +581,7 @@ func (r *sizeExceededAppendConnector) AddMessagesToMailbox( _ []imap.MessageID, _ imap.MailboxID, ) error { - return fmt.Errorf("messsage to large: %w", connector.ErrMessageSizeExceedsLimits) + return fmt.Errorf("message to large: %w", connector.ErrMessageSizeExceedsLimits) } type sizeExceededAppendConnectorBuilder struct{}