mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
doc/go1.17: document net/... changes
For #44513. Fixes #46014. Fixes #46015. Fixes #46016. Fixes #46017. Change-Id: I356483d68d07159281dfe2ea1e49430ddf200973 Reviewed-on: https://go-review.googlesource.com/c/go/+/322891 Trust: Damien Neil <dneil@google.com> Run-TryBot: Damien Neil <dneil@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
0fbecece98
commit
1d5298d46a
2 changed files with 18 additions and 7 deletions
|
|
@ -418,15 +418,20 @@ Do not send CLs removing the interior tags from such phrases.
|
||||||
<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
|
<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p><!-- CL 272668 -->
|
<p><!-- CL 272668 -->
|
||||||
TODO: <a href="https://golang.org/cl/272668">https://golang.org/cl/272668</a>: add IP.IsPrivate
|
The new method <a href="/pkg/net/#IP.IsPrivate"><code>IP.IsPrivate</code></a> reports whether an address is
|
||||||
|
a private IPv4 address according to <a href="http://tools.ietf.org/html/rfc1918">RFC 1918</a>
|
||||||
|
or a local IPv6 address according <a href="http://tools.ietf.org/html/rfc4193">RFC 4193</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p><!-- CL 301709 -->
|
<p><!-- CL 301709 -->
|
||||||
TODO: <a href="https://golang.org/cl/301709">https://golang.org/cl/301709</a>: make go resolver aware of network parameter
|
The Go DNS resolver now only sends one DNS query when resolving an address for an IPv4-only or IPv6-only network,
|
||||||
|
rather than querying for both address families.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p><!-- CL 307030 -->
|
<p><!-- CL 307030 -->
|
||||||
TODO: <a href="https://golang.org/cl/307030">https://golang.org/cl/307030</a>: make ErrClosed and ParseError implement net.Error
|
The <a href="/pkg/net/#ErrClosed"><code>ErrClosed</code></a> sentinel error and
|
||||||
|
<a href="/pkg/net/#ParseError"><code>ParseError</code></a> error type now implement
|
||||||
|
the <a href="/pkg/net/#Error"><code>net.Error</code></a> interface.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl><!-- net -->
|
</dl><!-- net -->
|
||||||
|
|
@ -441,7 +446,9 @@ Do not send CLs removing the interior tags from such phrases.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p><!-- CL 235437 -->
|
<p><!-- CL 235437 -->
|
||||||
TODO: <a href="https://golang.org/cl/235437">https://golang.org/cl/235437</a>: add to deadlines only when positive
|
Setting the <a href="/pkg/net/http/#Server"><code>Server</code></a>
|
||||||
|
<code>ReadTimeout</code> or <code>WriteTimeout</code> fields to a negative value now indicates no timeout
|
||||||
|
rather than an immediate timeout.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p><!-- CL 308952 -->
|
<p><!-- CL 308952 -->
|
||||||
|
|
@ -454,7 +461,10 @@ Do not send CLs removing the interior tags from such phrases.
|
||||||
<dl id="net/http/httptest"><dt><a href="/pkg/net/http/httptest/">net/http/httptest</a></dt>
|
<dl id="net/http/httptest"><dt><a href="/pkg/net/http/httptest/">net/http/httptest</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p><!-- CL 308950 -->
|
<p><!-- CL 308950 -->
|
||||||
TODO: <a href="https://golang.org/cl/308950">https://golang.org/cl/308950</a>: panic on non-3 digit (XXX) status code in Recorder.WriteHeader
|
<a href="/pkg/net/http/httptest/#ResponseRecorder.WriteHeader"><code>ResponseRecorder.WriteHeader></code></a>
|
||||||
|
now panics when the provided code is not a valid three-digit HTTP status code.
|
||||||
|
This matches the behavior of <a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter></code></a>
|
||||||
|
implementations in the <a href="/pkg/net/http/"><code>net/http</code></a> package.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl><!-- net/http/httptest -->
|
</dl><!-- net/http/httptest -->
|
||||||
|
|
@ -462,7 +472,8 @@ Do not send CLs removing the interior tags from such phrases.
|
||||||
<dl id="net/url"><dt><a href="/pkg/net/url/">net/url</a></dt>
|
<dl id="net/url"><dt><a href="/pkg/net/url/">net/url</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p><!-- CL 314850 -->
|
<p><!-- CL 314850 -->
|
||||||
TODO: <a href="https://golang.org/cl/314850">https://golang.org/cl/314850</a>: add Values.Has
|
The new method <a href="/pkg/net/url/#Values.Has"><code>Values.Has</code></a>
|
||||||
|
reports whether a query parameter is set.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl><!-- net/url -->
|
</dl><!-- net/url -->
|
||||||
|
|
|
||||||
|
|
@ -462,7 +462,7 @@ func TestFdReadRace(t *testing.T) {
|
||||||
// Give the other goroutine a chance to enter the Read.
|
// Give the other goroutine a chance to enter the Read.
|
||||||
// It doesn't matter if this occasionally fails, the test
|
// It doesn't matter if this occasionally fails, the test
|
||||||
// will still pass, it just won't test anything.
|
// will still pass, it just won't test anything.
|
||||||
time.Sleep(10 * time.Millisecond)
|
//time.Sleep(10 * time.Millisecond)
|
||||||
r.Fd()
|
r.Fd()
|
||||||
|
|
||||||
// The bug was that Fd would hang until Read timed out.
|
// The bug was that Fd would hang until Read timed out.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue