Convert int to string using fmt.Sprintf

See https://github.com/golang/go/issues/32479

Fix #341.

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
This commit is contained in:
Robert-André Mauchin
2020-07-31 23:58:32 +02:00
parent 89946c829f
commit 51a0e1a4bb

View File

@@ -1,6 +1,7 @@
package goquery
import (
"fmt"
"testing"
)
@@ -31,7 +32,7 @@ func BenchmarkMap(b *testing.B) {
sel := DocW().Find("td")
f := func(i int, s *Selection) string {
tmp++
return string(tmp)
return fmt.Sprintf("%d", tmp)
}
b.StartTimer()
for i := 0; i < b.N; i++ {