]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: enhance documentation for Server.Addr
authorAnderson Queiroz <contato@andersonq.eti.br>
Fri, 23 Aug 2019 14:02:40 +0000 (15:02 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 27 Aug 2019 20:52:49 +0000 (20:52 +0000)
Fixes golang/go#31249

Change-Id: I3280f8ab170ed31d4efb71106533e016d430d44c
Reviewed-on: https://go-review.googlesource.com/c/go/+/191557
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/server.go

index f554c813000480baf97ae99f19df38404320198d..feff20045a0216c47f32996d7bd5f200d12e13f7 100644 (file)
@@ -2488,7 +2488,12 @@ func ServeTLS(l net.Listener, handler Handler, certFile, keyFile string) error {
 // A Server defines parameters for running an HTTP server.
 // The zero value for Server is a valid configuration.
 type Server struct {
-       Addr    string  // TCP address to listen on, ":http" if empty
+       // Addr optionally specifies the TCP address for the server to listen on,
+       // in the form "host:port". If empty, ":http" (port 80) is used.
+       // The service names are defined in RFC 6335 and assigned by IANA.
+       // See net.Dial for details of the address format.
+       Addr string
+
        Handler Handler // handler to invoke, http.DefaultServeMux if nil
 
        // TLSConfig optionally provides a TLS configuration for use