Documentation
¶
Overview ¶
Package bindingtest applies the binding rule to the source of a package, so that a request type no route test reaches still fails a build.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDir ¶
CheckDir returns one message per exported field, of a struct type declared in a non-test file of dir, that binding.SourceOf refuses, plus one per source tag inside a struct the body fills. An embedded field with no json tag is left to the package that declares its type. It returns an error when dir cannot be read or a file in it cannot be parsed.
func CheckTree ¶
CheckTree returns, for every package under root, the messages CheckDir would for each struct type that names a source of binding.Sources on any field, declared at package level or inside a function. A struct that names none is not a request, so the rule does not reach it. Directories named testdata, vendor or node_modules, or starting with a dot, are skipped. It returns an error when a directory cannot be read or parsed.
Types ¶
This section is empty.