]> Cypherpunks repositories - gostls13.git/commitdiff
net: clarify LookupAddr docs on libc's behavior, and alternatives
authorBrad Fitzpatrick <bradfitz@golang.org>
Sat, 22 Oct 2016 01:03:49 +0000 (18:03 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sat, 22 Oct 2016 01:23:14 +0000 (01:23 +0000)
Text from rsc.

Fixes #17093

Change-Id: I13c3018b1584f152b53f8576dd16ebef98aa5182
Reviewed-on: https://go-review.googlesource.com/31720
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/lookup.go

index 28e23fa1c11914c5b27ca105882100fabed668fc..8b5cab0894f8bae64e817bc354b96f156c2a4932 100644 (file)
@@ -307,6 +307,9 @@ func (r *Resolver) LookupTXT(ctx context.Context, name string) ([]string, error)
 
 // LookupAddr performs a reverse lookup for the given address, returning a list
 // of names mapping to that address.
+//
+// When using the host C library resolver, at most one result will be
+// returned. To bypass the host resolver, use a custom Resolver.
 func LookupAddr(addr string) (names []string, err error) {
        return DefaultResolver.lookupAddr(context.Background(), addr)
 }