[go-nuts] Feedback on naming issue when interface vs main code struct

2017-03-04 Thread Henry
I believe there are two kinds of interface: one that represents a domain object (eg. Consumer) and the other that represents a one or two methods (eg. Stringer, ReadCloser). Typically, you use the first one when you use interface to represent a data type. The second one is used when you need onl

[go-nuts] Feedback on naming issue when interface vs main code struct

2017-03-03 Thread mlg
Would appreciate some feedback on a naming issue my team has been struggling with recently. We sometimes use interfaces for mocking in tests, as described in this blogpost: https://nathanleclaire.com/blog/2015/10/10/interfaces-and-composition-for-effective-unit-testing-in-golang/. The naming i