Skip to content

Latest commit

 

History

History
1 lines (1 loc) · 342 Bytes

README.md

File metadata and controls

1 lines (1 loc) · 342 Bytes

This code uses the LookupIPAddr function from the net package to perform a DNS lookup for the IP address of the domain google.com. The context package is used to set a timeout of 5 seconds for the DNS lookup to prevent the program from hanging indefinitely. Finally, the first IP address returned by the DNS lookup is printed to the console.