I don't believe this is possible. See the spec on method sets[1]. The excerpt I'm looking at:
> The method set of any other type T consists of all methods > <https://golang.org/ref/spec#Method_declarations> declared with receiver > type T. The method set of the corresponding pointer type > <https://golang.org/ref/spec#Pointer_types> *T is the set of all methods > declared with receiver *T or T (that is, it also contains the method set > of T). Which leads me to believe that a pointer to a type always includes at least the methods of the original type. 1. https://golang.org/ref/spec#Method_sets On Monday, September 12, 2016 at 2:20:46 PM UTC-7, Alex Flint wrote: > > Is it possible to have a struct that implements an interface, but have > pointers to the struct not implement the interface? The reason is that I > want to find all the places in our codebase that attempt to use a pointer > to a certain struct as a certain interface. > -- 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.