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 <iant@golang.org>
This commit is contained in:
Brad Fitzpatrick 2016-10-21 18:03:49 -07:00
parent aa1e063efd
commit eb15cf16ae
1 changed files with 3 additions and 0 deletions

View 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)
}