because of the inheritance-based interface, and
showcases the power of Go interfaces. It's usually defined in the package
that needs it.
Both use cases are valid depending on what you're building and both are
possible in Go.
On Monday, November 21, 2016 at 10:30:21 AM UTC-5, Vorn M
Sorry if it was asked before, but where should interfaces live?
- In the package that contains an implementation of it.
- In its own package.
- or in the package that needs it.
The standard library is not consistent. For example:
- io.Writer is defined in a package that also has an
Thanks, that was it!
On Wednesday, June 1, 2016 at 3:58:55 PM UTC-4, Vorn Mom wrote:
>
> I have a Go package hosted in a private git repo. The go package consists
> of a parent package and two sub packages:
>
> github.privaterepo.com/vmom/gizbus
> github.privaterepo.co