Documentation
¶
Overview ¶
Package yamlpathtest provides test-double utilities to aid in testing code that leverages the yamlpath library.
This makes it possible to control what concrete yamlpath.YAMLPath instances return without requiring specific yaml constructs to do so.
Index ¶
- Variables
- func Bool(b bool) *yamlpath.YAMLPath
- func BoolSequence(bools ...bool) *yamlpath.YAMLPath
- func Collection(nodes ...*yaml.Node) *yamlpath.YAMLPath
- func Error(err error) *yamlpath.YAMLPath
- func Float(float float64) *yamlpath.YAMLPath
- func FloatSequence(floats ...float64) *yamlpath.YAMLPath
- func Int(i int) *yamlpath.YAMLPath
- func IntSequence(ints ...int) *yamlpath.YAMLPath
- func Null() *yamlpath.YAMLPath
- func Object(v any) *yamlpath.YAMLPath
- func ObjectSequence(vs ...any) *yamlpath.YAMLPath
- func String(s string) *yamlpath.YAMLPath
- func StringSequence(strings ...string) *yamlpath.YAMLPath
Constants ¶
This section is empty.
Variables ¶
var ( // True is a YAMLPath that always returns a boolean truthy value. True = Bool(true) // False is a YAMLPath that always returns a boolean falsey value. False = Bool(false) )
Functions ¶
func Bool ¶
Bool returns a yamlpath.YAMLPath object that returns the given boolean.
func BoolSequence ¶
BoolSequence returns a yamlpath.YAMLPath object that returns a sequence containing the given booleans.
func Collection ¶
Collection returns a yamlpath.YAMLPath object that returns the given nodes.
func Error ¶
Error returns a yamlpath.YAMLPath object that always returns the given error.
func Float ¶
Float returns a yamlpath.YAMLPath object that returns the given float.
func FloatSequence ¶
FloatSequence returns a yamlpath.YAMLPath object that returns a sequence containing the given floats.
func Int ¶
Int returns a yamlpath.YAMLPath object that returns the given integer.
func IntSequence ¶
IntSequence returns a yamlpath.YAMLPath object that returns a sequence containing the given integers.
func Null ¶
Null returns a yamlpath.YAMLPath object that returns a null value.
func Object ¶
Object returns a yamlpath.YAMLPath object that returns the given value.
func ObjectSequence ¶
ObjectSequence returns a yamlpath.YAMLPath object that returns a sequence containing the given values.
func String ¶
String returns a yamlpath.YAMLPath object that returns the given string.
func StringSequence ¶
StringSequence returns a yamlpath.YAMLPath object that returns a sequence containing the given strings.
Types ¶
This section is empty.