golang string to int64 code example
Example 1: golang convert string to int
Int, err := strconv.Atoi("12345")
Example 2: golang convert string to int64
s := "97"
n, err := strconv.ParseInt(s, 10, 64)
if err == nil {
fmt.Printf("%d of type %T", n, n)
}
Example 3: convert string to int golang
var s string
i, err := strconv.Atoi(s)
Example 4: int to int64 golang
var i int = 32
j := int64(i)