summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--digStatusWindow.go13
-rw-r--r--dns.go3
2 files changed, 8 insertions, 8 deletions
diff --git a/digStatusWindow.go b/digStatusWindow.go
index 5fc375a..04fb1b9 100644
--- a/digStatusWindow.go
+++ b/digStatusWindow.go
@@ -17,6 +17,7 @@ import (
"fmt"
"os"
"reflect"
+ "strings"
"time"
"go.wit.com/gui"
@@ -252,13 +253,13 @@ func (ds *digStatus) updateDnsStatus() {
ds.setIPv6status("Need VPN")
}
- r := shell.Output("", []string{"dig", "+noall", "+answer", "www.wit.com", "A"})
- log.Log(DNS, "makeDnsStatusGrid() dig", r.Stdout())
- me.digStatus.set(ds.DnsDigUDP, r.Stdout())
+ r := shell.Run([]string{"dig", "+noall", "+answer", "www.wit.com", "A"})
+ log.Log(DNS, "makeDnsStatusGrid() dig", r.Stdout)
+ me.digStatus.set(ds.DnsDigUDP, strings.Join(r.Stdout, "\n"))
- r = shell.Output("", []string{"dig", "+noall", "+answer", "www.wit.com", "AAAA"})
- log.Log(DNS, "makeDnsStatusGrid() dig", r.Stdout())
- me.digStatus.set(ds.DnsDigTCP, r.Stdout())
+ r = shell.Run([]string{"dig", "+noall", "+answer", "www.wit.com", "AAAA"})
+ log.Log(DNS, "makeDnsStatusGrid() dig", r.Stdout)
+ me.digStatus.set(ds.DnsDigTCP, strings.Join(r.Stdout, "\n"))
/*
g2.NewButton("dig +trace", func () {
diff --git a/dns.go b/dns.go
index 9382f33..7de45e2 100644
--- a/dns.go
+++ b/dns.go
@@ -8,7 +8,6 @@ import (
"net"
"strings"
- "go.wit.com/lib/gui/shell"
"go.wit.com/log"
)
@@ -88,7 +87,7 @@ func lookupNS(domain string) {
setProvider(s)
}
}
- tmp = shell.Chomp(tmp)
+ tmp = strings.TrimSpace(tmp)
if tmp != me.statusDNS.NSrr.String() {
me.changed = true