summaryrefslogtreecommitdiff
path: root/dns.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-21 00:15:20 -0600
committerJeff Carr <[email protected]>2024-01-21 00:15:20 -0600
commitfdc01e28d9f45e923bdbc783f957e5b87f108659 (patch)
treee5ff92b4cbeb21d7c57eec0cf4cc8aa71d622ee3 /dns.go
parent495a08eddaef290dd4a6f63a543cf31ef26522f5 (diff)
name changes in the gui package
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'dns.go')
-rw-r--r--dns.go43
1 files changed, 22 insertions, 21 deletions
diff --git a/dns.go b/dns.go
index 6107141..82b452d 100644
--- a/dns.go
+++ b/dns.go
@@ -4,40 +4,41 @@
package main
-import (
+import (
"net"
"strings"
"go.wit.com/log"
- "go.wit.com/shell"
+ "go.wit.com/lib/gui/shell"
)
/*
- Check a bunch of things. If they don't work right, then things are not correctly configured
- They are things like:
- /etc/hosts
- hostname
- hostname -f
- domainname
+Check a bunch of things. If they don't work right, then things are not correctly configured
+They are things like:
+
+ /etc/hosts
+ hostname
+ hostname -f
+ domainname
*/
func (h *Host) verifyETC() bool {
return true
}
func (h *Host) updateIPs(host string) {
- ips, err := net.LookupIP(host)
- if err != nil {
- log.Error(err, "updateIPs failed")
- }
- for _, ip := range ips {
- log.Println(host, ip)
- }
+ ips, err := net.LookupIP(host)
+ if err != nil {
+ log.Error(err, "updateIPs failed")
+ }
+ for _, ip := range ips {
+ log.Println(host, ip)
+ }
}
func (h *Host) setIPv4(ipv4s map[string]*IPtype) {
- for ip, t := range ipv4s {
+ for ip, t := range ipv4s {
log.Println("IPv4", ip, t)
- }
+ }
}
/*
@@ -70,7 +71,7 @@ func lookupNS(domain string) {
// checks to see if the NS records change
for _, server := range servers {
server = strings.TrimRight(server, ".")
- if (me.nsmap[server] != domain) {
+ if me.nsmap[server] != domain {
log.Log(CHANGE, "lookupNS() domain", domain, "has NS", server)
me.nsmap[server] = domain
domains += server + "\n"
@@ -81,7 +82,7 @@ func lookupNS(domain string) {
// checks to see if the NS records change
for s, d := range me.nsmap {
log.Log(CHANGE, "lookupNS() domain =", d, "server =", s)
- if (domain == d) {
+ if domain == d {
tmp += s + "\n"
// figure out the provider (google, cloudflare, etc)
setProvider(s)
@@ -89,10 +90,10 @@ func lookupNS(domain string) {
}
tmp = shell.Chomp(tmp)
- if (tmp != me.statusDNS.NSrr.Get()) {
+ if tmp != me.statusDNS.NSrr.String() {
me.changed = true
log.Log(CHANGE, "lookupNS() setting changed to me.NSrr =", tmp)
- me.statusDNS.NSrr.Set(tmp)
+ me.statusDNS.NSrr.SetValue(tmp)
}
}