title: How to pass interface of struct type by reference in golang?
body: <p>I need to pass an interface of a struct type by reference as shown below. Since, I can't use pointers of interface to struct type variables, how should I change the below code to modify <code>te</code> value to <code>10</code>?.</p>
  
  <pre><code>package main
  
  import (
      "fmt"
  )
  
  func another(te *interface{}) {
      *te = check{Val: 10}
  }
  
  func some(te *interface{}) {
      *te = check{Val: 20}
      another(te)
  }
  
  type check struct {
      Val int
  }
  
  func main() {
      a := check{Val: 100}
      p := &amp;a
      fmt.Println(*p)
      some(p)
      fmt.Println(*p)
  }
  </code></pre>
  
  <p>Thanks!</p>
  
  <p>P.S I have read that passing pointers to interfaces is not a very good practice. Kindly let me know what could be a better way to handle it</p>