branching

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestFunc

type TestFunc func(value interface{}, args ...interface{}) (bool, error)

TestFunc represents a test function

type TestRegistry

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

TestRegistry manages template tests

func NewTestRegistry

func NewTestRegistry() *TestRegistry

NewTestRegistry creates a new test registry

func (*TestRegistry) Apply

func (r *TestRegistry) Apply(name string, value interface{}, args ...interface{}) (bool, error)

Apply applies a test to a value

func (*TestRegistry) Get

func (r *TestRegistry) Get(name string) (TestFunc, bool)

Get retrieves a test function by name

func (*TestRegistry) List

func (r *TestRegistry) List() []string

List returns all registered test names

func (*TestRegistry) Register

func (r *TestRegistry) Register(name string, test TestFunc) error

Register registers a test function

Jump to

Keyboard shortcuts

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