summaryrefslogtreecommitdiff
path: root/net.go
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 /net.go
parent70a7ca6d75b0bffbd184b1780bca5a9b0db46c70 (diff)
trim linefeeds
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'net.go')
-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)
}