doc/go1.19: document Resolver.PreferGo

Updates #51400

Change-Id: I61733574362d4cf3cb65122bd13361e5c0f6728c
Reviewed-on: https://go-review.googlesource.com/c/go/+/410375
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
This commit is contained in:
Brad Fitzpatrick 2022-06-03 21:18:14 -07:00 committed by Gopher Robot
parent 11195c60e6
commit c1e2ecbaf9

View file

@ -343,7 +343,20 @@ Do not send CLs removing the interior tags from such phrases.
</dd>
<dd>
<p><!-- CL 400654 -->
TODO: <a href="https://go.dev/cl/400654">https://go.dev/cl/400654</a>: permit use of Resolver.PreferGo, netgo on Windows and Plan 9
<a href="/pkg/net/#Resolver.PreferGo"><code>Resolver.PreferGo</code></a>
is now implemented on Windows and Plan 9. It previously only worked on Unix
platforms. Combined with
<a href="/pkg/net/#Dialer.Resolver"><code>Dialer.Resolver</code></a> and
<a href="/pkg/net/#Resolver.Dial"><code>Resolver.Dial</code></a>, it's now
possible to write portable programs and be in control of all DNS name lookups
when dialing.
</p>
<p>
The <code>net</code> package now has initial support for the <code>netgo</code>
build tag on Windows. When used, the package uses the Go DNS client (as used
by <code>Resolver.PreferGo</code>) instead of asking Windows for
DNS results. The upstream DNS server it discovers from Windows
may not yet be correct with complex system network configurations, however.
</p>
</dd>
</dl><!-- net -->