In the real world, we use physical addresses to help us find where a friend lives, where a business is located, or where a party is being thrown (well, I don't because I'm not invited to parties, but I digress).
In computing, web clients find other computers over the internet using Internet Protocol (IP) addresses. Each device connected to the internet has a unique IP address.
When we browse the internet, we type in a human readable domain name. That domain is converted into an IP address. The IP address tells our computer where the server is located on the internet.
Click to play video
Cloudflare is a tech company that provides a cool HTTP server that we can use to look up the IP address of any domain.
I've provided a getIPAddress function that makes a request to Cloudflare. The function takes a domain name as input and returns the IP address associated with that domain.
The function currently prints a string representation of the entire response we receive from Cloudflare.
I've provided a DNSResponse struct in dns.go you might find useful.