Documentation
¶
Overview ¶
Package goconsts reads string constants out of Go source so a test can check that every constant of a family is handled, without a hand-kept list that goes stale the same way the code under test would.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringsWithPrefix ¶
StringsWithPrefix parses the non-test Go files in dir and returns the values of every package-level constant whose name starts with prefix, sorted. Each matching constant must be a plain string literal; anything else (iota, expressions) fails the test so it is never skipped silently.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.