parse string a int golang code example
Example 1: convert string to int golang
var s string
i, err := strconv.Atoi(s)
Example 2: golang string to int
i, err := strconv.Atoi("-42")
s := strconv.Itoa(-42)
var s string
i, err := strconv.Atoi(s)
i, err := strconv.Atoi("-42")
s := strconv.Itoa(-42)