@@ -3161,11 +3161,11 @@ func AllowQuerySemicolons(h Handler) Handler {
3161
3161
})
3162
3162
}
3163
3163
3164
- // ListenAndServe listens on the TCP network address srv .Addr and then
3164
+ // ListenAndServe listens on the TCP network address s .Addr and then
3165
3165
// calls [Serve] to handle requests on incoming connections.
3166
3166
// Accepted connections are configured to enable TCP keep-alives.
3167
3167
//
3168
- // If srv .Addr is blank, ":http" is used.
3168
+ // If s .Addr is blank, ":http" is used.
3169
3169
//
3170
3170
// ListenAndServe always returns a non-nil error. After [Server.Shutdown] or [Server.Close],
3171
3171
// the returned error is [ErrServerClosed].
@@ -3187,7 +3187,7 @@ func (s *Server) ListenAndServe() error {
3187
3187
var testHookServerServe func (* Server , net.Listener ) // used if non-nil
3188
3188
3189
3189
// shouldConfigureHTTP2ForServe reports whether Server.Serve should configure
3190
- // automatic HTTP/2. (which sets up the srv .TLSNextProto map)
3190
+ // automatic HTTP/2. (which sets up the s .TLSNextProto map)
3191
3191
func (s * Server ) shouldConfigureHTTP2ForServe () bool {
3192
3192
if s .TLSConfig == nil {
3193
3193
// Compatibility with Go 1.6:
@@ -3214,7 +3214,7 @@ var ErrServerClosed = errors.New("http: Server closed")
3214
3214
3215
3215
// Serve accepts incoming connections on the Listener l, creating a
3216
3216
// new service goroutine for each. The service goroutines read requests and
3217
- // then call srv .Handler to reply to them.
3217
+ // then call s .Handler to reply to them.
3218
3218
//
3219
3219
// HTTP/2 support is only enabled if the Listener returns [*tls.Conn]
3220
3220
// connections and they were configured with "h2" in the TLS
@@ -3288,7 +3288,7 @@ func (s *Server) Serve(l net.Listener) error {
3288
3288
3289
3289
// ServeTLS accepts incoming connections on the Listener l, creating a
3290
3290
// new service goroutine for each. The service goroutines perform TLS
3291
- // setup and then read requests, calling srv .Handler to reply to them.
3291
+ // setup and then read requests, calling s .Handler to reply to them.
3292
3292
//
3293
3293
// Files containing a certificate and matching private key for the
3294
3294
// server must be provided if neither the [Server]'s
@@ -3448,7 +3448,7 @@ func ListenAndServeTLS(addr, certFile, keyFile string, handler Handler) error {
3448
3448
return server .ListenAndServeTLS (certFile , keyFile )
3449
3449
}
3450
3450
3451
- // ListenAndServeTLS listens on the TCP network address srv .Addr and
3451
+ // ListenAndServeTLS listens on the TCP network address s .Addr and
3452
3452
// then calls [ServeTLS] to handle requests on incoming TLS connections.
3453
3453
// Accepted connections are configured to enable TCP keep-alives.
3454
3454
//
@@ -3459,7 +3459,7 @@ func ListenAndServeTLS(addr, certFile, keyFile string, handler Handler) error {
3459
3459
// concatenation of the server's certificate, any intermediates, and
3460
3460
// the CA's certificate.
3461
3461
//
3462
- // If srv .Addr is blank, ":https" is used.
3462
+ // If s .Addr is blank, ":https" is used.
3463
3463
//
3464
3464
// ListenAndServeTLS always returns a non-nil error. After [Server.Shutdown] or
3465
3465
// [Server.Close], the returned error is [ErrServerClosed].
@@ -3483,15 +3483,15 @@ func (s *Server) ListenAndServeTLS(certFile, keyFile string) error {
3483
3483
}
3484
3484
3485
3485
// setupHTTP2_ServeTLS conditionally configures HTTP/2 on
3486
- // srv and reports whether there was an error setting it up. If it is
3486
+ // s and reports whether there was an error setting it up. If it is
3487
3487
// not configured for policy reasons, nil is returned.
3488
3488
func (s * Server ) setupHTTP2_ServeTLS () error {
3489
3489
s .nextProtoOnce .Do (s .onceSetNextProtoDefaults )
3490
3490
return s .nextProtoErr
3491
3491
}
3492
3492
3493
3493
// setupHTTP2_Serve is called from (*Server).Serve and conditionally
3494
- // configures HTTP/2 on srv using a more conservative policy than
3494
+ // configures HTTP/2 on s using a more conservative policy than
3495
3495
// setupHTTP2_ServeTLS because Serve is called after tls.Listen,
3496
3496
// and may be called concurrently. See shouldConfigureHTTP2ForServe.
3497
3497
//
@@ -3512,8 +3512,8 @@ func (s *Server) onceSetNextProtoDefaults_Serve() {
3512
3512
var http2server = godebug .New ("http2server" )
3513
3513
3514
3514
// onceSetNextProtoDefaults configures HTTP/2, if the user hasn't
3515
- // configured otherwise. (by setting srv .TLSNextProto non-nil)
3516
- // It must only be called via srv .nextProtoOnce (use srv .setupHTTP2_*).
3515
+ // configured otherwise. (by setting s .TLSNextProto non-nil)
3516
+ // It must only be called via s .nextProtoOnce (use s .setupHTTP2_*).
3517
3517
func (s * Server ) onceSetNextProtoDefaults () {
3518
3518
if omitBundledHTTP2 {
3519
3519
return
0 commit comments