mirror of
https://github.com/PuerkitoBio/goquery.git
synced 2024-04-21 12:31:36 +00:00
use strconv.Itoa instead of fmt.Sprintf
This commit is contained in:
@@ -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++ {
|
||||
|
||||
Reference in New Issue
Block a user