Skip to content

Commit eb144bf

Browse files
committed
net/http: golint fixes
Resolves various var naming issues detected by `golint` Updates #21779 Change-Id: I70d0cf1356dd25b74a290c9a01602b97a247a348
1 parent 28ccae8 commit eb144bf

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/net/http/server.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,7 +2810,7 @@ func (srv *Server) Serve(l net.Listener) error {
28102810
l = &onceCloseListener{Listener: l}
28112811
defer l.Close()
28122812

2813-
if err := srv.setupHTTP2_Serve(); err != nil {
2813+
if err := srv.setupHTTP2Serve(); err != nil {
28142814
return err
28152815
}
28162816

@@ -2868,7 +2868,7 @@ func (srv *Server) Serve(l net.Listener) error {
28682868
func (srv *Server) ServeTLS(l net.Listener, certFile, keyFile string) error {
28692869
// Setup HTTP/2 before srv.Serve, to initialize srv.TLSConfig
28702870
// before we clone it and create the TLS Listener.
2871-
if err := srv.setupHTTP2_ServeTLS(); err != nil {
2871+
if err := srv.setupHTTP2ServeTLS(); err != nil {
28722872
return err
28732873
}
28742874

@@ -3048,28 +3048,28 @@ func (srv *Server) ListenAndServeTLS(certFile, keyFile string) error {
30483048
return srv.ServeTLS(tcpKeepAliveListener{ln.(*net.TCPListener)}, certFile, keyFile)
30493049
}
30503050

3051-
// setupHTTP2_ServeTLS conditionally configures HTTP/2 on
3051+
// setupHTTP2ServeTLS conditionally configures HTTP/2 on
30523052
// srv and returns whether there was an error setting it up. If it is
30533053
// not configured for policy reasons, nil is returned.
3054-
func (srv *Server) setupHTTP2_ServeTLS() error {
3054+
func (srv *Server) setupHTTP2ServeTLS() error {
30553055
srv.nextProtoOnce.Do(srv.onceSetNextProtoDefaults)
30563056
return srv.nextProtoErr
30573057
}
30583058

3059-
// setupHTTP2_Serve is called from (*Server).Serve and conditionally
3059+
// setupHTTP2Serve is called from (*Server).Serve and conditionally
30603060
// configures HTTP/2 on srv using a more conservative policy than
3061-
// setupHTTP2_ServeTLS because Serve is called after tls.Listen,
3061+
// setupHTTP2ServeTLS because Serve is called after tls.Listen,
30623062
// and may be called concurrently. See shouldConfigureHTTP2ForServe.
30633063
//
30643064
// The tests named TestTransportAutomaticHTTP2* and
30653065
// TestConcurrentServerServe in server_test.go demonstrate some
30663066
// of the supported use cases and motivations.
3067-
func (srv *Server) setupHTTP2_Serve() error {
3068-
srv.nextProtoOnce.Do(srv.onceSetNextProtoDefaults_Serve)
3067+
func (srv *Server) setupHTTP2Serve() error {
3068+
srv.nextProtoOnce.Do(srv.onceSetNextProtoDefaultsServe)
30693069
return srv.nextProtoErr
30703070
}
30713071

3072-
func (srv *Server) onceSetNextProtoDefaults_Serve() {
3072+
func (srv *Server) onceSetNextProtoDefaultsServe() {
30733073
if srv.shouldConfigureHTTP2ForServe() {
30743074
srv.onceSetNextProtoDefaults()
30753075
}

0 commit comments

Comments
 (0)