Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Interfaces ¶
Interfaces generates the public interfaces for checker providers implementations in package check (provider_*.go files). It should be run every time their API is modified (method signature change, doc comment, new method, method removal, ...)
func Types ¶
Types generates checkers declarations in packages check and checkconv for each type defined in var `types`. It should be run every time this list is modified.
For instance, the following entry:
{N: "Int", T: "int"},
generates the following declarations:
// file check/check.go
type IntPassFunc func(got int) bool
type IntPasser interface { Pass(got int) bool }
type IntChecker interface { IntPasser; Explainer }
// file check/checkers.go
type intChecker struct { ... }
func (c intChecker) Pass(got int) bool { ... }
func NewIntChecker(passFunc IntPassFunc, explainFunc ExplainFunc) IntChecker { ... }
// file checkconv/assert.go
func FromInt(c check.IntChecker) check.ValueChecker { ... }
// also adds a case in checkconv.Assert:
case check.IntChecker:
return FromInt(c)
Types ¶
Click to show internal directories.
Click to hide internal directories.