m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 23:33:39 -05:00

refactor: replace []byte(fmt.Sprintf) with fmt.Appendf (#4507)

Signed-off-by: zhedazijingang <unwrap_or_else@outlook.com>
This commit is contained in:
zhedazijingang
2025-08-31 21:01:35 +08:00
committed by GitHub
parent a3c9f8bfee
commit 59dc7f178f

View File

@@ -52,7 +52,7 @@ func TestChunkList(t *testing.T) {
// Add more data // Add more data
for i := 0; i < chunkSize*2; i++ { for i := 0; i < chunkSize*2; i++ {
cl.Push([]byte(fmt.Sprintf("item %d", i))) cl.Push(fmt.Appendf(nil, "item %d", i))
} }
// Previous snapshot should remain the same // Previous snapshot should remain the same
@@ -86,7 +86,7 @@ func TestChunkListTail(t *testing.T) {
}) })
total := chunkSize*2 + chunkSize/2 total := chunkSize*2 + chunkSize/2
for i := 0; i < total; i++ { for i := 0; i < total; i++ {
cl.Push([]byte(fmt.Sprintf("item %d", i))) cl.Push(fmt.Appendf(nil, "item %d", i))
} }
snapshot, count, changed := cl.Snapshot(0) snapshot, count, changed := cl.Snapshot(0)