title: Why golang struct array cannot be assigned to an interface array
body: <p>I'm trying to achieve something as below. </p>
  
  <pre><code>package main
  
  import (
      "fmt"
  )
  
  type MyStruct struct {
      Value int
  }
  
  func main() {
      x := []MyStruct{
          MyStruct{
              Value : 5,
          },
          MyStruct{
              Value : 6,
          },
      }
      var y []interface{}
      y = x // This throws a compile time error
  
      _,_ = x,y
  }
  </code></pre>
  
  <p>This gives a compile time error:</p>
  
  <pre><code>sample.go:21: cannot use x (type []MyStruct) as type []interface {} in assignment
  </code></pre>
  
  <p>Why is this not possible?.If not is there any other way to hold generic object arrays in  Golang?</p>