]> Cypherpunks repositories - gostls13.git/commit
net: net remove completed return from cgo lookup functions
authorMateusz Poliwczak <mpoliwczak34@gmail.com>
Tue, 2 May 2023 14:17:54 +0000 (14:17 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 4 May 2023 16:28:59 +0000 (16:28 +0000)
commit2c49bf89ed2aed91bae6a0869d30de927b4a2cbf
treecc092f313932d2de6267f9aacfdc76509bdbe1b1
parent1596aeec8ecc8f115bffad49a3d92944fc278f9a
net: net remove completed return from cgo lookup functions

After CL 487196 there is no need anymore to return
completed == false from the cgo lookup functions and
then fallback to to go resolver.  (Before CL 487196 this
change would cause the (only?) tests to fail)
Now the cgoAvailable constant guards that correctly.

This change will cause a panic when the cgo resolver is being
used without the cgo support, so it will be easier to
detect bug while changing the code in the net package.

I am leaving the completed return from cgoLookupCNAME,
because it is super broken now.

Change-Id: I2661b9a3725de2b1a229847c12adf64b3f62b136
GitHub-Last-Rev: 2a6501a53e1b2c5195c3869d528a40e7f93d6225
GitHub-Pull-Request: golang/go#59925
Reviewed-on: https://go-review.googlesource.com/c/go/+/491275
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Mateusz Poliwczak <mpoliwczak34@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/net/cgo_stub.go
src/net/cgo_unix.go
src/net/cgo_unix_test.go
src/net/lookup_unix.go
src/net/netgo_unix_test.go [deleted file]