Right now I am doing the following in order to parse an integer from a string and then convert it to int
type:
tmpValue, _ := strconv.ParseInt(str, 10, 64) //returns int64
finalValue = int(tmpValue)
It is quite verbose, and definitely not pretty, since I haven't found a way to do the conversion in the ParseInt
call. Is there a nicer way to do that?