github.com/gopherjs/gopherjs@v1.19.0-beta1.0.20240506212314-27071a8796e4/compiler/natives/src/strconv/itoa.go (about) 1 //go:build js 2 // +build js 3 4 package strconv 5 6 import ( 7 "github.com/gopherjs/gopherjs/js" 8 ) 9 10 // Itoa in gopherjs is always a 32bit int so the native toString 11 // always handles it successfully. 12 func Itoa(i int) string { 13 return js.InternalObject(i).Call("toString").String() 14 }