Skip to content

stevenacoffman/go-craft

v0.1.0MIT

Go application design: packages, dependency injection, errors, HTTP services, and CLIs.

dep-comp-function-first-composition

Invoke when injecting dependencies in Go without an interface per external call, or when tests are heavy with generated mocks: a Dependencies struct of function-typed fields, a New(deps) factory, real wiring in main.go, function literals in tests. Not for many-method dependencies.

Read SKILL.md at the source

Pinned to revision e4081cbb4d29, so it is the text this page describes rather than whatever the author pushed since.

Files

Every link opens the file at its source, pinned to the revision this page describes.