add a struct for the machine

'me' is probably not a great variable name

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2023-02-09 19:47:52 -06:00
parent 798f7a7c15
commit 4c348438f3
1 changed files with 14 additions and 1 deletions

15
unix.go
View File

@ -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)
}
}