use strconv.Itoa instead of fmt.Sprintf

This commit is contained in:
Martin Angers
2020-08-01 19:32:09 -04:00
parent 51a0e1a4bb
commit cd12820764
+2 -2
View File
@@ -1,7 +1,7 @@
package goquery
import (
"fmt"
"strconv"
"testing"
)
@@ -32,7 +32,7 @@ func BenchmarkMap(b *testing.B) {
sel := DocW().Find("td")
f := func(i int, s *Selection) string {
tmp++
return fmt.Sprintf("%d", tmp)
return strconv.Itoa(tmp)
}
b.StartTimer()
for i := 0; i < b.N; i++ {