title: Defining a function that returns a slice of variable size in golang
body: <p>I would like to build a function that returns a slice of any size.  I know I can do</p>
  <pre><code>func BuildSlice() [100]int { return [100]int{} }
  </code></pre>
  <p>but I would like to be able to return slices of different sizes from the same function.  Something like:</p>
  <pre><code>func BuildSlice(int size) [...]int { return [size]int{} }
  </code></pre>
  <p>I've tried the above as well as</p>
  <pre><code>func BuildSlice(size int) []int { return [size]int{} }
  </code></pre>
  <p>Please point me in the right direction.</p>