expr

package
v2.2.3 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvaluateArray

func EvaluateArray[ReturnType any](ctx context.Context, logger kitlog.Logger, source string, subject any) ([]ReturnType, error)

func EvaluateJavascript

func EvaluateJavascript(ctx context.Context, logger kitlog.Logger, source string, subject any) (result otto.Value, err error)

EvaluateJavascript can evaluate a source Javascript program having set the given subject into the `$` variable.

func EvaluateResultType

func EvaluateResultType[ReturnType any](ctx context.Context, logger kitlog.Logger, source string, result otto.Value) (*ReturnType, error)

func EvaluateSingleValue

func EvaluateSingleValue[ReturnType any](ctx context.Context, logger kitlog.Logger, source string, subject any) (*ReturnType, error)

func SafelyGo

func SafelyGo(do func())

Types

This section is empty.

Jump to

Keyboard shortcuts

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