Skip to content

stevenacoffman/go-craft

v0.1.0MIT

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

matryer-run-function

Apply when making a Go program's startup testable: testing main, calling the program from tests with controlled args, env, and stdio, avoiding flag.Parse and os.Getenv global state that blocks t.Parallel(), and graceful shutdown from tests. Not for handler, middleware, or decoding logic.

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.