summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-03-26 16:56:09 -0500
committerJeff Carr <[email protected]>2023-03-26 16:56:09 -0500
commit81cb8bad80da03ec827ee6befb93b41262f72aa2 (patch)
treefdbb42a83c71b7af831535d705b6e46821abb71e
parentd03ca57c3aa37d00e22ababc7039c8091111d5a8 (diff)
TrimSpace()
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--net.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/net.go b/net.go
index a519fa1..0efa6c0 100644
--- a/net.go
+++ b/net.go
@@ -225,10 +225,8 @@ 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")
+ all4 = strings.TrimSpace(all4)
+ all6 = strings.TrimSpace(all6)
me.IPv4.SetText(all4)
me.IPv6.SetText(all6)
}