summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-03-26 16:49:56 -0500
committerJeff Carr <[email protected]>2023-03-26 16:49:56 -0500
commitc63132fd4a4b7559c17813368fd8f747045f194a (patch)
tree7baa1d30ec57cd303c71c577668eaeeb63425e4b
parent70a7ca6d75b0bffbd184b1780bca5a9b0db46c70 (diff)
trim linefeeds
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--main.go2
-rw-r--r--net.go4
2 files changed, 5 insertions, 1 deletions
diff --git a/main.go b/main.go
index 57acc16..00f5a3b 100644
--- a/main.go
+++ b/main.go
@@ -86,7 +86,7 @@ func dnsTTL() {
log("my actual AAAA = ",s)
all += s + "\n"
}
- me.IPv6.SetText(all)
+ // me.IPv6.SetText(all)
if (me.changed) {
stamp := time.Now().Format("2006/01/02 15:04:05")
diff --git a/net.go b/net.go
index 0c80790..a519fa1 100644
--- a/net.go
+++ b/net.go
@@ -225,6 +225,10 @@ func scanInterfaces() {
all6 += s + "\n"
}
}
+ all4 = strings.TrimSuffix(all4, "\r\n")
+ all4 = strings.TrimSuffix(all4, "\n")
+ all6 = strings.TrimSuffix(all6, "\r\n")
+ all6 = strings.TrimSuffix(all6, "\n")
me.IPv4.SetText(all4)
me.IPv6.SetText(all6)
}