net: support forceCgoDNS and forceGoDns on windows

Windows is able to use the go resolver now, so let the forceCgoDNS and forceGoDns work.

Change-Id: Ice3d9fda9530ec88a2a22077c9a729dd940aba6d
GitHub-Last-Rev: e0b6e39870
GitHub-Pull-Request: golang/go#59250
Reviewed-on: https://go-review.googlesource.com/c/go/+/479455
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
Mateusz Poliwczak 2023-03-26 08:35:12 +00:00 committed by Gopher Robot
parent f7156f63b5
commit 1cfc87e6db
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !js && !plan9 && !windows
//go:build !js && !plan9
package net

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build (js && wasm) || plan9 || windows
//go:build (js && wasm) || plan9
package net
@ -11,7 +11,7 @@ import "runtime"
// See main_conf_test.go for what these (don't) do.
func forceGoDNS() func() {
switch runtime.GOOS {
case "plan9", "windows":
case "plan9":
return func() {}
default:
return nil