cond

package
v0.15.13 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Evaluate

func Evaluate(inputExpr string, lookupFns ...VariableLookupFunction) (bool, error)

Evaluate evaluates an input expression. Expressions are groups of string values combined with equal or unequal comparators. The order of comparison operations can be designated using groups enclosed inside parenthesis. An optional VariableLookupFunction can be provided to provide variable lookups.

func NullLookup

func NullLookup(key string) (string, error)

NullLookup returns an empty value for any requested variable and does not return an error. This is the default variable lookup function used by Evaluate.

func Subst added in v0.3.0

func Subst(inputExpr string, lookupFns ...VariableLookupFunction) (string, error)

Types

type VariableLookupFunction

type VariableLookupFunction func(key string) (string, error)

A VariableLookupFunction designates how variables should be resolved when evaluating expressions.

Jump to

Keyboard shortcuts

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