Documentation
¶
Overview ¶
Package surface renders a module's exported Go surface as text, so a golden file can pin it and a test can fail on any drift.
It parses and never type-checks, with the standard library alone, so the pin adds no dependency to the module. Its one use of go/types is a name lookup in the universe scope, which is a table rather than a type checker.
Index ¶
Constants ¶
View Source
const Header = "# forgeapi exported surface, rendered by internal/surface. Regenerate with:\n" +
"# UPDATE_GOLDEN=1 go test ./... -run TestExportedSurfaceMatchesGolden\n"
Header is the first line of the rendered surface. It names the generator so a reader of the golden file knows the file is not hand-maintained.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.