[go-nuts] Re: make a struct pointer _not_ implement an interface

2016-09-16 Thread Jason E. Aten
On Monday, September 12, 2016 at 4:20:46 PM UTC-5, 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 >

[go-nuts] Re: make a struct pointer _not_ implement an interface

2016-09-12 Thread Tyler Compton
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 > declared with receiver > type T. The method set of the corresponding pointer type >