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
commitd03ca57c3aa37d00e22ababc7039c8091111d5a8 (patch)
tree1c52af27de0019726c26df827dbfeeecd3d502f7
parent35ae17e15cef079b0f94616ab3ce475fcadc03e2 (diff)
trim linefeeds
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--net.go4
1 files changed, 4 insertions, 0 deletions
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)
}