diff options
| author | cui fliter <imcusg@gmail.com> | 2022-11-11 19:22:35 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-11-18 17:59:44 +0000 |
| commit | b2faff18ce28edad98303d2c3134dec1331fd7b5 (patch) | |
| tree | 2161dfe37742a6be201f506abf0d4f20533e8d76 /src/net/http | |
| parent | 893964b9727a3dfcadab75c0f6b3c6b683b9bae0 (diff) | |
| download | go-b2faff18ce28edad98303d2c3134dec1331fd7b5.tar.xz | |
all: add missing periods in comments
Change-Id: I69065f8adf101fdb28682c55997f503013a50e29
Reviewed-on: https://go-review.googlesource.com/c/go/+/449757
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Joedian Reid <joedian@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/net/http')
| -rw-r--r-- | src/net/http/client.go | 2 | ||||
| -rw-r--r-- | src/net/http/cookie.go | 2 | ||||
| -rw-r--r-- | src/net/http/transfer.go | 8 | ||||
| -rw-r--r-- | src/net/http/transport.go | 2 | ||||
| -rw-r--r-- | src/net/http/triv.go | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/src/net/http/client.go b/src/net/http/client.go index 617446b030..122e8d030d 100644 --- a/src/net/http/client.go +++ b/src/net/http/client.go @@ -499,7 +499,7 @@ func (c *Client) checkRedirect(req *Request, via []*Request) error { } // redirectBehavior describes what should happen when the -// client encounters a 3xx status code from the server +// client encounters a 3xx status code from the server. func redirectBehavior(reqMethod string, resp *Response, ireq *Request) (redirectMethod string, shouldRedirect, includeBody bool) { switch resp.StatusCode { case 301, 302, 303: diff --git a/src/net/http/cookie.go b/src/net/http/cookie.go index b7b0455ee1..912fde6b95 100644 --- a/src/net/http/cookie.go +++ b/src/net/http/cookie.go @@ -273,7 +273,7 @@ func (c *Cookie) Valid() error { // readCookies parses all "Cookie" values from the header h and // returns the successfully parsed Cookies. // -// if filter isn't empty, only cookies of that name are returned +// if filter isn't empty, only cookies of that name are returned. func readCookies(h Header, filter string) []*Cookie { lines := h["Cookie"] if len(lines) == 0 { diff --git a/src/net/http/transfer.go b/src/net/http/transfer.go index 09b42c188a..7c7afd7de4 100644 --- a/src/net/http/transfer.go +++ b/src/net/http/transfer.go @@ -600,7 +600,7 @@ func readTransfer(msg any, r *bufio.Reader) (err error) { return nil } -// Checks whether chunked is part of the encodings stack +// Checks whether chunked is part of the encodings stack. func chunked(te []string) bool { return len(te) > 0 && te[0] == "chunked" } // Checks whether the encoding is explicitly "identity". @@ -738,7 +738,7 @@ func fixLength(isResponse bool, status int, requestMethod string, header Header, // Determine whether to hang up after sending a request and body, or // receiving a response and body -// 'header' is the request headers +// 'header' is the request headers. func shouldClose(major, minor int, header Header, removeCloseHeader bool) bool { if major < 1 { return true @@ -757,7 +757,7 @@ func shouldClose(major, minor int, header Header, removeCloseHeader bool) bool { return hasClose } -// Parse the trailer header +// Parse the trailer header. func fixTrailer(header Header, chunked bool) (Header, error) { vv, ok := header["Trailer"] if !ok { @@ -1081,7 +1081,7 @@ var nopCloserWriterToType = reflect.TypeOf(io.NopCloser(struct { }{})) // unwrapNopCloser return the underlying reader and true if r is a NopCloser -// else it return false +// else it return false. func unwrapNopCloser(r io.Reader) (underlyingReader io.Reader, isNopCloser bool) { switch reflect.TypeOf(r) { case nopCloserType, nopCloserWriterToType: diff --git a/src/net/http/transport.go b/src/net/http/transport.go index e4434e8076..ddcb64815c 100644 --- a/src/net/http/transport.go +++ b/src/net/http/transport.go @@ -2743,7 +2743,7 @@ var portMap = map[string]string{ "socks5": "1080", } -// canonicalAddr returns url.Host but always with a ":port" suffix +// canonicalAddr returns url.Host but always with a ":port" suffix. func canonicalAddr(url *url.URL) string { addr := url.Hostname() if v, err := idnaASCII(addr); err == nil { diff --git a/src/net/http/triv.go b/src/net/http/triv.go index 1e2eea22b7..32edbbb344 100644 --- a/src/net/http/triv.go +++ b/src/net/http/triv.go @@ -101,7 +101,7 @@ func (ch Chan) ServeHTTP(w http.ResponseWriter, req *http.Request) { io.WriteString(w, fmt.Sprintf("channel send #%d\n", <-ch)) } -// exec a program, redirecting output +// exec a program, redirecting output. func DateServer(rw http.ResponseWriter, req *http.Request) { rw.Header().Set("Content-Type", "text/plain; charset=utf-8") |
