When I start a new feature in Go I keep reaching for the interface first. That order is wrong: write the concrete struct, and let interfaces show up at whatever consumes the dependency.
Posts tagged with design-patterns
No framework, no container, no reflection scanning your struct fields at startup: Go's version of dependency injection is a constructor argument, and interfaces are what make that argument swappable.