summaryrefslogtreecommitdiff
path: root/format.go
diff options
context:
space:
mode:
Diffstat (limited to 'format.go')
-rw-r--r--format.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/format.go b/format.go
index 0758da8..4369314 100644
--- a/format.go
+++ b/format.go
@@ -5,7 +5,8 @@ import (
"strings"
)
-func split(s string, n int) (ret []string) {
+func split(s string, n int) []string {
+ ret := make([]string, 0, len(s)/n+1)
var pos int
if rest := len(s) % n; rest > 0 {
ret = append(ret, s[:rest])