Documentation ¶ Overview ¶ Package resolver implements the resolver used to resolve hostnames to IP addresses. Index ¶ func Resolve(ctx context.Context, address string) (*net.IPAddr, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Resolve ¶ func Resolve(ctx context.Context, address string) (*net.IPAddr, error) Resolve resolves the given hostname to an IP address. It prefers IPv4 addresses if available, and falls back to IPv6 addresses if not. If the hostname was already resolved and it is still valid, it returns the cached IP address. Types ¶ This section is empty. Source Files ¶ View all Source files doc.go resolver.go Click to show internal directories. Click to hide internal directories.