title: How to create method on slice
body: <p>I have this:</p>
  <pre><code>type DbTransaction struct {
    Tx *sql.Tx
    DidTransactionFinish bool
  }
  
  type DbTransactionSlice []DbTransaction
  
  func (v *DbTransactionSlice) push(x *DbTransaction) *DbTransaction{
    append(v, x)
    return x;
  }
  </code></pre>
  <p>I just want a method that appends an element and returns that element. The error I get is:</p>
  <blockquote>
  <p>Cannot use 'v' (type *DbTransactionSlice) as type []Type</p>
  </blockquote>
  <p>anyone know how to do what I want to do?</p>