Discover Packages
github.com/kelindar/expr
internal
fixture
package
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Sep 1, 2026
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package fixture owns the shared YAML format for expression examples.
Evaluate executes a fixture using the production typed contract.
Files loads all domain fixture files below root in stable order. Domain files
may live beside their package or in internal/fixtures.
InputJSON returns the fixture input in the evaluator's JSON form.
type Case struct {
Name string `yaml:"name"`
Expression string `yaml:"expression"`
Input any `yaml:"input,omitempty"`
At string `yaml:"at,omitempty"`
Expect *Expectation `yaml:"expect,omitempty"`
Error string `yaml:"error,omitempty"`
Benchmark []string `yaml:"benchmark,omitempty"`
}
Case is one expression fixture. Exactly one of Expect or Error must be set.
Load decodes and validates expression fixtures from YAML.
LoadFile reads and decodes one fixture file.
type Expectation struct {
Type string `yaml:"type"`
Out any `yaml:"out,omitempty"`
}
Expectation describes the stable typed result envelope.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.