The same explanation that applies to slices of interfaces (https://golang.org/doc/faq#convert_slice_of_interface <https://golang.org/doc/faq#convert_slice_of_interface>) applies to pointers to interfaces. You shouldn't need a pointer to interface anyway; what are you trying to do? > On Nov 7, 2016, at 1:16 AM, Kaylen Wheeler <kfjwhee...@gmail.com> wrote: > > I'm new to Go, and I'm still trying to figure it out. I'm trying to write a > function that takes a pointer to a pointer of any type. > > I tried writing it like this: > > type MyStruct struct { > a int > b int > } > > func myFunc(p **interface{}) { > fmt.Printf("Here is the type: %T\n", p) > } > > func main() { > var m *MyStruct > myFunc(&m) > } > > However, I get the error: > > .\main.go:32: cannot use &m (type **MyStruct) as type **interface {} in > argument to myFunc > > Elapsed: 1.001s > > Result: Error > > Is there any way to do this? > > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com > <mailto:golang-nuts+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>.
-- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.