title: Convert uint32 to int in Go
body: <p>How do I convert a <code>uint32</code> into an <code>int</code> in Go?</p>
  
  <p>A little background, I'm reading from a file and this gives me the correct size from a byte array like this:</p>
  
  <pre><code>size := binary.BigEndian.Uint32(b[4:])
  </code></pre>
  
  <p>However, the <code>bufio.Discard</code> func expects an int.  I was able to use fmt to convert size to a string and then use strconv to get it to an int. There has to be a more elegant way to do this.</p>