Documentation
¶
Overview ¶
Package libguard reads the source of a library ovdb builds on, for the tests that hold ovdb's text and branches to the values that library can produce. Where a library exports a list of its values the test uses that list; where it exports only constants (github.com/strongo/cli-helpers' skillsync actions, selfupdate failure kinds) these helpers read them from the source of the exact version go.mod selects, so the library gaining a value fails a test, with a message saying what to add, instead of reaching a person as a panic or a silently wrong line.
Only tests import this package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstNamesWithPrefix ¶
ConstNamesWithPrefix lists, in source order, the names of the constants in files that start with prefix.
func HasStringLiteral ¶
HasStringLiteral reports whether any file holds the string literal text.
func Source ¶
Source parses the non-test Go files of the package importPath as the build resolves it. It fails the test when the go command or the source is not available: a guard that cannot read the library must not pass quietly.
func StringConstsOfType ¶
StringConstsOfType lists, sorted, the string values of the constants of type typeName in files, written as `Name Type = "value"`, `Name = Type("value")`, `Name Type = Type("value")`, or several names at once, `A, B Type = "a", "b"`.
Types ¶
This section is empty.