From: Brad Fitzpatrick Date: Sat, 22 Oct 2016 01:03:49 +0000 (-0700) Subject: net: clarify LookupAddr docs on libc's behavior, and alternatives X-Git-Tag: go1.8beta1~715 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=eb15cf16aee1ec4387b7397b102bd2cc3ff33a64;p=gostls13.git net: clarify LookupAddr docs on libc's behavior, and alternatives Text from rsc. Fixes #17093 Change-Id: I13c3018b1584f152b53f8576dd16ebef98aa5182 Reviewed-on: https://go-review.googlesource.com/31720 Reviewed-by: Ian Lance Taylor --- diff --git a/src/net/lookup.go b/src/net/lookup.go index 28e23fa1c1..8b5cab0894 100644 --- a/src/net/lookup.go +++ b/src/net/lookup.go @@ -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) }