trim linefeeds

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2023-03-26 16:49:56 -05:00
parent 70a7ca6d75
commit c63132fd4a
2 changed files with 5 additions and 1 deletions

View File

@ -86,7 +86,7 @@ func dnsTTL() {
log("my actual AAAA = ",s) log("my actual AAAA = ",s)
all += s + "\n" all += s + "\n"
} }
me.IPv6.SetText(all) // me.IPv6.SetText(all)
if (me.changed) { if (me.changed) {
stamp := time.Now().Format("2006/01/02 15:04:05") stamp := time.Now().Format("2006/01/02 15:04:05")

4
net.go
View File

@ -225,6 +225,10 @@ func scanInterfaces() {
all6 += s + "\n" 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.IPv4.SetText(all4)
me.IPv6.SetText(all6) me.IPv6.SetText(all6)
} }