expr

package
v0.0.92 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalAny

func EvalAny(ctx context.Context, env map[string]string, data map[string]any, expr any) (any, error)

func EvalBool

func EvalBool(ctx context.Context, env map[string]string, data map[string]any, expr any) (bool, error)

func EvalList

func EvalList(ctx context.Context, env map[string]string, data map[string]any, expr any) ([]any, error)

func EvalObject

func EvalObject(ctx context.Context, env map[string]string, data map[string]any, expr any) (any, error)

func EvalString

func EvalString(ctx context.Context, env map[string]string, data map[string]any, expr string) (string, error)

func Expand

func Expand(s string, mapping func(string) string) string

Expand is similar to os.Expand but handles nested curly braces correctly. It replaces ${var} in the input string with the value returned by the mapping function. If var contains curly braces, the entire var name is passed to the mapping function.

func Lookup

func Lookup(envMap map[string]string, envKey string) (string, bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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