title: Convert byte array of ASCII numeric characters to int using GO language
body: <p>I see some answers to exactly the same question I have: How to convert Byte array to int in GO programming language?</p>
  
  <p>I wrote below function to convert byte array to int</p>
  
  <pre><code>func convertByteToInt(in []byte) int32 {
      return  (int32(in[0]) &lt;&lt; 24 | int32(in[1]) &lt;&lt; 16 | int32(in[2]) &lt;&lt; 8 | int32(in[3]))
  }
  </code></pre>
  
  <p>Before that, I made sure that byte array has correct(base 256) values.
      in[0] = 54 (ASCII for 6),
      in[1] = 54 (ASCII for 6),
      in[2] = 49 (ASCII for 1),
      in[3] = 49 (ASCII for 1).</p>
  
  <p>So I am expecting to retrieve integer 6611 value from byte array, but I ended up getting 909521201. I fail to understand what is exactly going on in such a simple conversion.
  Can anyone flash some light?</p>
  
  <p>THanks</p>