I want to convert string to integer in golang. But I don't know the format of string. For example, "10" -> 10, "65.0" -> 65, "xx" -> 0, "11xx" -> 11, "xx11"->0
I do some searching and find strconv.ParseInt(). But it can not handle "65.0". So I have to check string's format.
Is there a better way?