title: cast from float32 to int in Go
body: <p>I have tried several ways to cast a float to an int, what I want is to truncate a float so I only get the integer part.
  I'm using</p>
  
  <pre><code>x := float32(3.1)
  y,_ := strconv.Atoi((strconv.Ftoa32(x,'f',0))) //y becomes 3
  </code></pre>
  
  <p>But if x is 3.9, y will become 4 because this function will round the float32 instead of truncating.
  Is there a way of truncating instead of rounding? and if so, is it possible to do it without involving strings? (like casting a float to int in C)</p>