title: Go error: non-constant array bound
body: <p>I'm trying to calculate the necessary length for an array in a merge sort implementation I'm writing in <code>go</code>. It looks like this:</p>
  
  <pre><code>func merge(array []int, start, middle, end int) {
    leftLength := middle - start + 1
    rightLength := end - middle
    var left [leftLength]int
    var right [rightLength]int
    //...
  }
  </code></pre>
  
  <p>I then get this complaint when running <code>go test</code>:</p>
  
  <pre><code>./mergesort.go:6: non-constant array bound leftLength
  ./mergesort.go:7: non-constant array bound rightLength
  </code></pre>
  
  <p>I assume <code>go</code> does not enjoy users instantiating an Array's length with a calculated value. It only accepts <em>constants</em>. Should I just give up and use a slice instead? I expect a <em>slice</em> is a dynamic array meaning it's either a linked list or copies into a larger array when it gets full.</p>