golang převést int na řetězec
str := strconv.Itoa(12)
golang parse float64
f, err := strconv.ParseFloat("3.1415", 64)
přejít převést celé číslo na řetězec
s := strconv.Itoa(i)
// also
s := strconv.FormatInt(i, 10)
// and also
s := fmt.Sprintf("%d", i)
golang převést řetězec na int64
s := "97"
n, err := strconv.ParseInt(s, 10, 64)
if err == nil {
fmt.Printf("%d of type %T", n, n)
}
převést řetězec na int golang
var s string
i, err := strconv.Atoi(s)