1. 5
  1.  

  2. 2

    Putting all your queries behind one interface will bite you once you leave “very small app” territory. You will have to stub the whole implementation for each test, and if you change some query/add some functionality, you will always have to touch code in two places. I’d argue that’s already the case here.

    1. 2

      Somebody wrote a blog post about the same issue you are pointing out: https://jrock.us/posts/go-interfaces/ As someone learning Go right now I found that very educational.