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