summaryrefslogtreecommitdiff
path: root/decode_scan_test.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-01-27 00:16:03 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-01-29 02:14:51 -0700
commita74b77265f6249385c38ba801822561872418fdf (patch)
tree8029df8498901327dd26a1f7da5cca1abdf3806b /decode_scan_test.go
parentbdfb423cbaff683269c7448afe6d93d224c5a482 (diff)
.golangci.yml: Turn on 'prealloc', fix
Diffstat (limited to 'decode_scan_test.go')
-rw-r--r--decode_scan_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/decode_scan_test.go b/decode_scan_test.go
index 5d1542f..f5ceee0 100644
--- a/decode_scan_test.go
+++ b/decode_scan_test.go
@@ -346,7 +346,8 @@ func TestElemRuneTypeScanner2(t *testing.T) {
{'"', 1, internal.RuneTypeStringEnd, nil},
{':', 1, internal.RuneTypeObjectColon, nil},
}
- var expStr, actStr []string
+ expStr := make([]string, 0, len(exp))
+ actStr := make([]string, 0, len(exp))
for _, iExp := range exp {
var iAct ReadRuneTypeResult
iAct.r, iAct.s, iAct.t, iAct.e = parent.ReadRuneType()