title: Appending one element to nil slice increases capacity by two
body: <p>I have a nil slice:    </p>
  
  <pre><code>var s1 []int // len(s1) == 0, cap(s1) == 0
  </code></pre>
  
  <p>Which I append one element to:</p>
  
  <pre><code>s2 := append(s1, 1) // len(s2) == 1, cap(s2) == 2
  </code></pre>
  
  <p><strong>Why is appending one element to a nil slice increases the capacity by 2?</strong></p>
  
  <p>Printing the slices using <code>fmt.Printf</code> shows the following:</p>
  
  <pre><code>[] // s1
  [1] // s2
  </code></pre>
  
  <p>I am also confused about why re-slicing <code>s2[0:2]</code> shows a zero which was not in the original slice nor appended to it:</p>
  
  <pre><code>[1,0] // s2[0:2]
  </code></pre>