boolevator

package
v0.91.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: AGPL-3.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInternal = errors.New("internal boolevator error")

Functions

func PrepareRegexp added in v0.29.1

func PrepareRegexp(r string) string

PrepareRegexp ensures that:

  • we match the whole string to avoid partial match false positives (e.g. we don't want ".*smh.*" regular expression to match an empty string "")
  • enable Pattern.DOTALL1 alternative in Go because otherwise simply adding ^ and $ will be too restricting, since we actually support multi-line matches
  • enable Pattern.CASE_INSENSITIVE alternative in Go to be compatible with the Cirrus Cloud parser

Types

type Boolevator added in v0.11.0

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

func New added in v0.11.0

func New(opts ...Option) *Boolevator

func (*Boolevator) Eval added in v0.11.0

func (boolevator *Boolevator) Eval(expr string, env map[string]string) (bool, error)

type Function

type Function func(arguments ...interface{}) interface{}

type Option added in v0.11.0

type Option func(*Boolevator)

func WithFunctions added in v0.11.0

func WithFunctions(functions map[string]Function) Option

Jump to

Keyboard shortcuts

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