Documentation
¶
Overview ¶
Package test compares a generated document tree against a stored JSON snapshot, and reports the first field that differs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrCannotReadDir = errors.New("cannot read directory") ErrGoModNotFound = errors.New("could not find go.mod") )
Errors reported when a snapshot file cannot be read or parsed.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
Value any `json:"value,omitempty"`
Type string `json:"type"`
Details map[string]any `json:"details,omitempty"`
Nodes []*Node `json:"nodes,omitempty"`
}
Node is one entry in the document tree written to a JSON snapshot: its type, its value, any extra details, and its children.