From 5b72cd8622b2204cdd5e7b7fb65261658d9102f2 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Wed, 3 Aug 2022 00:54:50 -0400 Subject: [PATCH] apply go1.19 gofmt --- irc/smtp/smtp.go | 4 +++- irc/socket.go | 13 +++++++------ irc/utils/proxy.go | 2 +- irc/utils/text.go | 7 +++++-- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/irc/smtp/smtp.go b/irc/smtp/smtp.go index 2cdc64db..30f6cc83 100644 --- a/irc/smtp/smtp.go +++ b/irc/smtp/smtp.go @@ -4,15 +4,17 @@ // Package smtp implements the Simple Mail Transfer Protocol as defined in RFC 5321. // It also implements the following extensions: +// // 8BITMIME RFC 1652 // AUTH RFC 2554 // STARTTLS RFC 3207 +// // Additional extensions may be handled by clients. // // The smtp package is frozen and is not accepting new features. // Some external packages provide more functionality. See: // -// https://godoc.org/?q=smtp +// https://godoc.org/?q=smtp package smtp import ( diff --git a/irc/socket.go b/irc/socket.go index ce8eb008..3a55bf5f 100644 --- a/irc/socket.go +++ b/irc/socket.go @@ -105,12 +105,13 @@ func (socket *Socket) Write(data []byte) (err error) { } // BlockingWrite sends the given string out of Socket. Requirements: -// 1. MUST block until the message is sent -// 2. MUST bypass sendq (calls to BlockingWrite cannot, on their own, cause a sendq overflow) -// 3. MUST provide mutual exclusion for socket.conn.Write -// 4. MUST respect the same ordering guarantees as Write (i.e., if a call to Write that sends -// message m1 happens-before a call to BlockingWrite that sends message m2, -// m1 must be sent on the wire before m2 +// 1. MUST block until the message is sent +// 2. MUST bypass sendq (calls to BlockingWrite cannot, on their own, cause a sendq overflow) +// 3. MUST provide mutual exclusion for socket.conn.Write +// 4. MUST respect the same ordering guarantees as Write (i.e., if a call to Write that sends +// message m1 happens-before a call to BlockingWrite that sends message m2, +// m1 must be sent on the wire before m2 +// // Callers MUST be writing to the client's socket from the client's own goroutine; // other callers must use the nonblocking Write call instead. Otherwise, a client // with a slow/unreliable connection risks stalling the progress of the system as a whole. diff --git a/irc/utils/proxy.go b/irc/utils/proxy.go index 22a48264..1cef6122 100644 --- a/irc/utils/proxy.go +++ b/irc/utils/proxy.go @@ -203,7 +203,7 @@ func parseProxyLineV2(line []byte) (ip net.IP, err error) { return ip, nil } -/// WrappedConn is a net.Conn with some additional data stapled to it; +// / WrappedConn is a net.Conn with some additional data stapled to it; // the proxied IP, if one was read via the PROXY protocol, and the listener // configuration. type WrappedConn struct { diff --git a/irc/utils/text.go b/irc/utils/text.go index d9104564..7a76b371 100644 --- a/irc/utils/text.go +++ b/irc/utils/text.go @@ -22,9 +22,12 @@ type MessagePair struct { // SplitMessage represents a message that's been split for sending. // Two possibilities: // (a) Standard message that can be relayed on a single 512-byte line -// (MessagePair contains the message, Split == nil) +// +// (MessagePair contains the message, Split == nil) +// // (b) multiline message that was split on the client side -// (Message == "", Split contains the split lines) +// +// (Message == "", Split contains the split lines) type SplitMessage struct { Message string Msgid string