For example, this code:
type person struct { //struct
id int
name string
}
func example() {
var (
p []person
pi []interface{}
)
pi = append(pi, person{
id: 1,
name: "Mike",
})
}
How to convert pi
to p
?