Introduction
Most Network Names are resolved through the Domain Name System.
In Go, there are three main levels to operate at with DNS:
- Implicit via
net.Dial
- Record arrays
- Third party library
Calls based on net.Dial
will accept a DNS name as part of the argument, and will attempt to resolve it in a simple way to an IP. If you don’t need to explore full records, this is the main approach you’ll use.
In this chapter, we’ll explore the later two options for querying DNS.