title: Concisely deep copy a slice?
body: <p>In Go, what's a concise/well-performing way to deep copy a slice? I need to copy the slice to a new backing array, because the other array is owned by something else and may be modified after the copy.</p>
  
  <p>I'm currently doing it like this:</p>
  
  <pre><code>copy := append([]T{}, orig...)
  </code></pre>
  
  <p>where <code>T</code> is the element type of <code>orig</code>.</p>