diff options
| author | Jeff Carr <[email protected]> | 2024-11-08 06:42:46 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-08 06:42:46 -0600 |
| commit | 1082f0b7f904cf5fc452fd93ada5907474f3f149 (patch) | |
| tree | 6b1c87e1f16b3babbb65e4625c942c96a010de12 | |
| parent | a4659ec59524279e5a80cd299491fe0a6dbf208a (diff) | |
use go-cmd/cmdv0.22.2
| -rw-r--r-- | digStatusWindow.go | 13 | ||||
| -rw-r--r-- | dns.go | 3 |
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 () { @@ -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 |
