News for hackers. Stuff that matters.
Re:How to Use Go Interfaces by notheguyouthink on Tuesday March 20, 2018 @09:19AM (#16628267)
That's a nice perspective. With that said though, what do you think about centralized data types?

I admit it, I make Repository and Service quite frequently. With that said, I also have data types shared among implementations. Normally the data types are defined within the parent packages to the implementations, the same packages that hold the Service definition.

I actually agree with your assertion that Service is bad form, and think I'll change it. I still have the issue though where a shared data type is commonly used among many implementations. Where do you think that will live? Perhaps in the same location, just without a formal Service interface?

There are no comments on this comment yet.