Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Go 1.6 is Released. Parent comment
I thought you could.
You don't add the methods directly to it, but you can easily embed the foreign type into a new type that confirms to the interface you want.
type FooWrapper struct { Foo } func (fw FooWrapper) SomeFunc() { ... }
I thought you could.
You don't add the methods directly to it, but you can easily embed the foreign type into a new type that confirms to the interface you want.