I was wondering how can I add an integer value to a string value like "10". I know I can accomplish this by converting the
string into an
int first and then after adding the integer I can convert it back into
string. But can I accomplish this in a single statement in golang. For example I can do this with multiple lines like this:
i, err := strconv.Atoi("10") // handle error i = i + 5 s := strconv.Itoa(i)
But is there any way that I can accomplish this in a single statement?