net: make GODEBUG=netdns=cgo force cgo as documented

It wasn't working. The wrong variable was used.

This would ideally have tests. It's also DEBUG.

Fixes #11816

Change-Id: Iec42d229b81d78cece4ba5c73f3040e2356eb98f
Reviewed-on: https://go-review.googlesource.com/12544
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Brad Fitzpatrick 2015-07-22 17:45:32 -07:00
parent dcc905ecf9
commit 17befdcec0
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ func initConfVal() {
_, localDomainDefined := syscall.Getenv("LOCALDOMAIN")
if os.Getenv("RES_OPTIONS") != "" ||
os.Getenv("HOSTALIASES") != "" ||
netCgo ||
confVal.netCgo ||
localDomainDefined {
confVal.forceCgoLookupHost = true
return