Browse Source

apply go1.19 gofmt

tags/v2.11.0-rc1
Shivaram Lingamneni 1 year ago
parent
commit
5b72cd8622
4 changed files with 16 additions and 10 deletions
  1. 3
    1
      irc/smtp/smtp.go
  2. 7
    6
      irc/socket.go
  3. 1
    1
      irc/utils/proxy.go
  4. 5
    2
      irc/utils/text.go

+ 3
- 1
irc/smtp/smtp.go View File

@@ -4,15 +4,17 @@
4 4
 
5 5
 // Package smtp implements the Simple Mail Transfer Protocol as defined in RFC 5321.
6 6
 // It also implements the following extensions:
7
+//
7 8
 //	8BITMIME  RFC 1652
8 9
 //	AUTH      RFC 2554
9 10
 //	STARTTLS  RFC 3207
11
+//
10 12
 // Additional extensions may be handled by clients.
11 13
 //
12 14
 // The smtp package is frozen and is not accepting new features.
13 15
 // Some external packages provide more functionality. See:
14 16
 //
15
-//   https://godoc.org/?q=smtp
17
+//	https://godoc.org/?q=smtp
16 18
 package smtp
17 19
 
18 20
 import (

+ 7
- 6
irc/socket.go View File

@@ -105,12 +105,13 @@ func (socket *Socket) Write(data []byte) (err error) {
105 105
 }
106 106
 
107 107
 // BlockingWrite sends the given string out of Socket. Requirements:
108
-// 1. MUST block until the message is sent
109
-// 2. MUST bypass sendq (calls to BlockingWrite cannot, on their own, cause a sendq overflow)
110
-// 3. MUST provide mutual exclusion for socket.conn.Write
111
-// 4. MUST respect the same ordering guarantees as Write (i.e., if a call to Write that sends
112
-//    message m1 happens-before a call to BlockingWrite that sends message m2,
113
-//    m1 must be sent on the wire before m2
108
+//  1. MUST block until the message is sent
109
+//  2. MUST bypass sendq (calls to BlockingWrite cannot, on their own, cause a sendq overflow)
110
+//  3. MUST provide mutual exclusion for socket.conn.Write
111
+//  4. MUST respect the same ordering guarantees as Write (i.e., if a call to Write that sends
112
+//     message m1 happens-before a call to BlockingWrite that sends message m2,
113
+//     m1 must be sent on the wire before m2
114
+//
114 115
 // Callers MUST be writing to the client's socket from the client's own goroutine;
115 116
 // other callers must use the nonblocking Write call instead. Otherwise, a client
116 117
 // with a slow/unreliable connection risks stalling the progress of the system as a whole.

+ 1
- 1
irc/utils/proxy.go View File

@@ -203,7 +203,7 @@ func parseProxyLineV2(line []byte) (ip net.IP, err error) {
203 203
 	return ip, nil
204 204
 }
205 205
 
206
-/// WrappedConn is a net.Conn with some additional data stapled to it;
206
+// / WrappedConn is a net.Conn with some additional data stapled to it;
207 207
 // the proxied IP, if one was read via the PROXY protocol, and the listener
208 208
 // configuration.
209 209
 type WrappedConn struct {

+ 5
- 2
irc/utils/text.go View File

@@ -22,9 +22,12 @@ type MessagePair struct {
22 22
 // SplitMessage represents a message that's been split for sending.
23 23
 // Two possibilities:
24 24
 // (a) Standard message that can be relayed on a single 512-byte line
25
-//     (MessagePair contains the message, Split == nil)
25
+//
26
+//	(MessagePair contains the message, Split == nil)
27
+//
26 28
 // (b) multiline message that was split on the client side
27
-//     (Message == "", Split contains the split lines)
29
+//
30
+//	(Message == "", Split contains the split lines)
28 31
 type SplitMessage struct {
29 32
 	Message string
30 33
 	Msgid   string

Loading…
Cancel
Save