Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by zhedazijingang · committed by GitHub · parent a3c9f8b · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: zhedazijingang <unwrap_or_else@outlook.com>

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:src/chunklist_test.go+2 added-2 removed
50 unmodified lines
51 }5253 // Add more data54 for i := 0; i < chunkSize*2; i++ {55 cl.Push([]byte(fmt.Sprintf("item %d", i)))55 cl.Push(fmt.Appendf(nil, "item %d", i))56 }5758 // Previous snapshot should remain the same59 if len(snapshot) != 1 {
25 unmodified lines
85 return true86 })87 total := chunkSize*2 + chunkSize/288 for i := 0; i < total; i++ {89 cl.Push([]byte(fmt.Sprintf("item %d", i)))89 cl.Push(fmt.Appendf(nil, "item %d", i))90 }9192 snapshot, count, changed := cl.Snapshot(0)93 assertCount := func(expected int, shouldChange bool) {
23 unmodified lines