expr

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RunCount   = metric.NewCounter("ExprRun")
	ErrCount   = metric.NewCounter("ExprErr")
	TrueCount  = metric.NewCounter("ExprTrue")
	FalseCount = metric.NewCounter("ExprFalse")
)

Functions

func AsBool

func AsBool(v any) bool

Types

type Expr

type Expr interface {
	Run(env map[string]any) (bool, error)
}

type Program

type Program struct {
	// contains filtered or unexported fields
}

func New

func New(code string) (*Program, error)

func (*Program) Run

func (p *Program) Run(env map[string]any) (bool, error)

Jump to

Keyboard shortcuts

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