From c63132fd4a4b7559c17813368fd8f747045f194a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 26 Mar 2023 16:49:56 -0500 Subject: [PATCH] trim linefeeds Signed-off-by: Jeff Carr --- main.go | 2 +- net.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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) }