Back to basics: Writing an application using Go and PostgreSQL
One should be careful about these mega-interfaces that define an entire subsystem of your application (DB in this case).  They are very painful to maintain, and add almost no value.  Interfaces should always be defined by the consumer of the interface, not by the producer.  And interfaces should never be used until there is a clear need.  CodeReviewComments covers the basics: <a href="https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go&#x2F;wiki&#x2F;CodeReviewComments#interfaces" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go&#x2F;wiki&#x2F;CodeReviewComments#interfa...</a><p>I wrote an insanely long rant about this with thorough examples using the structure of the article, but it was too long for HN.  So I put it on my blog instead: <a href="https:&#x2F;&#x2F;jrock.us&#x2F;posts&#x2F;go-interfaces&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jrock.us&#x2F;posts&#x2F;go-interfaces&#x2F;</a>