You're right, I had omitted the implementation by accident. Also, I realized what the issue is. In my real code that I'm working on I had the return type as *Config and not Config. I totally overlooked that, my mistake!
On Tuesday, February 14, 2017 at 3:12:43 PM UTC-5, Chris Manghane wrote: > > Seems to work fine to me: https://play.golang.org/p/6DmDKQLrzd. > > In your snippet, the concrete type doesn't implement the interface, > however. What was the error you got when trying to do apply this to more > complicated code. > > Chris > > On Tue, Feb 14, 2017 at 12:01 PM, Aaron Wood <aaron...@gmail.com > <javascript:>> wrote: > >> I'm wondering why it's not possible to do something like this >> https://play.golang.org/p/UaRLUvhkgz >> >> If a type implements an interface then why can that type not be returned >> with the method specifying the return type as the interface that it >> implements? >> >> -- >> 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...@googlegroups.com <javascript:>. >> For more options, visit 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.