cannot use type int as type int64 parsInt code example Example: convert string to int golang var s string i, err := strconv.Atoi(s)