From 4c348438f3b43e3de5c85a5fc8064cd0914f1fa2 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 9 Feb 2023 19:47:52 -0600 Subject: [PATCH] add a struct for the machine 'me' is probably not a great variable name Signed-off-by: Jeff Carr --- unix.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/unix.go b/unix.go index b953c60..3cebd40 100644 --- a/unix.go +++ b/unix.go @@ -1,4 +1,7 @@ -// This creates a simple hello world window +// Various Linux/Unix'y things + +// https://wiki.archlinux.org/title/Dynamic_DNS + package main import ( @@ -39,3 +42,13 @@ func DumpPublicDNSZone(zone string) { log.Println(entry) } } + +func dumpIPs(host string) { + ips, err := net.LookupIP(host) + if err != nil { + log.Fatal(err) + } + for _, ip := range ips { + log.Println(host, ip) + } +}