aboutsummaryrefslogtreecommitdiff
path: root/formatter/formatter.go
diff options
context:
space:
mode:
Diffstat (limited to 'formatter/formatter.go')
-rw-r--r--formatter/formatter.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/formatter/formatter.go b/formatter/formatter.go
index 25ecafc..7c80b96 100644
--- a/formatter/formatter.go
+++ b/formatter/formatter.go
@@ -111,8 +111,8 @@ func trimLeftSpaces(s string) string {
}
func trimRightSpaces(s string) string {
- i := len(s) - 1
rs := []rune(s)
+ i := len(rs) - 1
for i >= 0 && unicode.IsSpace(rs[i]) {
i--
}