diff options
| author | Joe Kyo <xunianzu@gmail.com> | 2017-10-31 09:47:27 +0000 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2017-10-31 14:02:12 +0000 |
| commit | 5536180ae72e8745c8a831e03f56a86360d76c52 (patch) | |
| tree | 1840f4888b761573780dabe84dfc731e889340ed /src | |
| parent | 8f4f1f63e9d5d171a669d0a9c4594bbaaf9ea6f7 (diff) | |
| download | go-5536180ae72e8745c8a831e03f56a86360d76c52.tar.xz | |
net/http: display connect methods table properly in `go doc`
When run `go doc -u http.connectMethod`, the whole table is treated as
a single long line. This commit inserts `\t` at the begining of each line,
so the table can be displayed properly in `go doc`.
Change-Id: I6408efd31f84c113e81167d62e1791643000d629
Reviewed-on: https://go-review.googlesource.com/74651
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/net/http/transport.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/net/http/transport.go b/src/net/http/transport.go index d08504d7ab..45e3fd2eba 100644 --- a/src/net/http/transport.go +++ b/src/net/http/transport.go @@ -1303,16 +1303,16 @@ func useProxy(addr string) bool { // // A connect method may be of the following types: // -// Cache key form Description -// ----------------- ------------------------- -// |http|foo.com http directly to server, no proxy -// |https|foo.com https directly to server, no proxy -// http://proxy.com|https|foo.com http to proxy, then CONNECT to foo.com -// http://proxy.com|http http to proxy, http to anywhere after that -// socks5://proxy.com|http|foo.com socks5 to proxy, then http to foo.com -// socks5://proxy.com|https|foo.com socks5 to proxy, then https to foo.com -// https://proxy.com|https|foo.com https to proxy, then CONNECT to foo.com -// https://proxy.com|http https to proxy, http to anywhere after that +// Cache key form Description +// ----------------- ------------------------- +// |http|foo.com http directly to server, no proxy +// |https|foo.com https directly to server, no proxy +// http://proxy.com|https|foo.com http to proxy, then CONNECT to foo.com +// http://proxy.com|http http to proxy, http to anywhere after that +// socks5://proxy.com|http|foo.com socks5 to proxy, then http to foo.com +// socks5://proxy.com|https|foo.com socks5 to proxy, then https to foo.com +// https://proxy.com|https|foo.com https to proxy, then CONNECT to foo.com +// https://proxy.com|http https to proxy, http to anywhere after that // type connectMethod struct { proxyURL *url.URL // nil for no proxy, else full proxy URL |
