Skip to content

Commit

Permalink
net/http: enhance documentation for Server.Addr
Browse files Browse the repository at this point in the history
Fixes #31249

Change-Id: I3280f8ab170ed31d4efb71106533e016d430d44c
Reviewed-on: https://go-review.googlesource.com/c/go/+/191557
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
AndersonQ authored and bradfitz committed Aug 27, 2019
1 parent 2ebc3d8 commit 2b59894
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/net/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b59894

Please sign in to comment.