The adapter pattern in Go (bitfieldconsulting.com)
from nebiros@programming.dev to golang@programming.dev on 28 Jul 2023 00:32
https://programming.dev/post/995280

threaded - newest

spacedogroy@feddit.uk on 28 Jul 2023 15:40 collapse

Yes by all means, split your business logic from your infrastructure layer, but for the love of god don’t use sqlmock. It’s 2023, we have testcontainers and the ability to relatively simply - and reliably - host external dependencies locally. With a MySQL or Postgres instance there isn’t really an excuse anymore to not be testing the integration.