diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/util.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/util.go b/src/util/util.go index 511de1e5..a0e12696 100644 --- a/src/util/util.go +++ b/src/util/util.go @@ -78,13 +78,13 @@ func IsTty() bool { return int(C.isatty(C.int(os.Stdin.Fd()))) != 0 } -func TrimRight(runes *[]rune) []rune { +func TrimRight(runes []rune) []rune { var i int - for i = len(*runes) - 1; i >= 0; i-- { - char := (*runes)[i] + for i = len(runes) - 1; i >= 0; i-- { + char := runes[i] if char != ' ' && char != '\t' { break } } - return (*runes)[0 : i+1] + return runes[0 : i+1] } |