title: Appending to go lang slice using reflection
body: <p>For some reason, it appears that adding new element to slice using reflection doesn't update slice itself. This is the code to demonstrate:</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "reflect"
  )
  
  func appendToSlice(arrPtr interface{}) {
      valuePtr := reflect.ValueOf(arrPtr)
      value := valuePtr.Elem()
      value = reflect.Append(value, reflect.ValueOf(55))
  
      fmt.Println(value.Len()) // prints 1
  }
  
  func main() {
      arr := []int{}
      appendToSlice(&amp;arr)
      fmt.Println(len(arr)) // prints 0
  }
  </code></pre>
  
  <p>Playground link : <a href="https://play.golang.org/p/j3532H_mUL" rel="noreferrer">https://play.golang.org/p/j3532H_mUL</a></p>
  
  <p>Is there something I'm missing here?</p>