Skip to content

Commit 41d860c

Browse files
mattywbradfitz
authored andcommitted
net/http: remove unused named return variables
The existing implementation names a c net.Conn return which is never user. Leaving the returns unamed is marginally clearer. Change-Id: If9a411c9235b78c116a8ffb21fef71f7a4a4ce8f Reviewed-on: https://go-review.googlesource.com/66890 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent a9a5806 commit 41d860c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/net/http/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3161,10 +3161,10 @@ type tcpKeepAliveListener struct {
31613161
*net.TCPListener
31623162
}
31633163

3164-
func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) {
3164+
func (ln tcpKeepAliveListener) Accept() (net.Conn, error) {
31653165
tc, err := ln.AcceptTCP()
31663166
if err != nil {
3167-
return
3167+
return nil, err
31683168
}
31693169
tc.SetKeepAlive(true)
31703170
tc.SetKeepAlivePeriod(3 * time.Minute)

0 commit comments

Comments
 (0)