title: How to prepend int to slice
body: <p>I am fairly new to Go and thus my question might seem a bit naive.</p>
  <p>I have a slice which I created using</p>
  <pre><code>var x []int;
  for i := 2; i &lt; 10; i += 2 {
      x = append(x, i);
  }
  </code></pre>
  <p>I want to prepend an integer to this slice, something like</p>
  <pre><code>x = append(2, x)
  </code></pre>
  <p>but obviously it won't work since append needs a slice as the first argument.</p>
  <p>I have tried <a href="https://codingair.wordpress.com/2014/07/18/go-appendprepend-item-into-slice/" rel="noreferrer">this</a> but it only works for strings and it's not working in my case.</p>