predicate

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package predicate evaluates assert predicates (`==`, `contains`, `isInteger`, …, optionally negated with `not`).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Eval

func Eval(p *syntax.Predicate, actual value.Value, env *template.Env) error

Eval evaluates p against the actual value (nil when the query returned nothing). It returns nil when the assert holds, a *runerr.Error of kind AssertFailure when it does not, or another *runerr.Error when the expected value cannot be evaluated.

func Value

func Value(v syntax.PredicateValue, span syntax.Span, env *template.Env) (value.Value, error)

Value evaluates a predicate value; span locates errors on a literal.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL