base

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 5 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 (
	ErrAssertion = errors.New("assertion error")
)

Functions

func FormatValue

func FormatValue(val core.Value) string

func NewNegativeAssertion

func NewNegativeAssertion(assertion Assertion) core.Function

func NewPositiveAssertion

func NewPositiveAssertion(assertion Assertion) core.Function

Types

type Assertion

type Assertion struct {
	DefaultMessage MessageFn
	MinArgs        int
	MaxArgs        int
	Fn             AssertionFn
}

type AssertionFn

type AssertionFn func(ctx context.Context, args []core.Value) (bool, error)

type CompareOperator

type CompareOperator int
const (
	NotEqualOp       CompareOperator = 0
	EqualOp          CompareOperator = 1
	LessOp           CompareOperator = 2
	LessOrEqualOp    CompareOperator = 3
	GreaterOp        CompareOperator = 4
	GreaterOrEqualOp CompareOperator = 5
)

func (CompareOperator) Compare

func (op CompareOperator) Compare(args []core.Value) (bool, error)

func (CompareOperator) String

func (op CompareOperator) String() string

type MessageFn

type MessageFn func(args []core.Value) string

Jump to

Keyboard shortcuts

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