matchers

package
v0.2026242.1237 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchAll

func MatchAll(value string, matchers []spec.Matcher) error

MatchAll returns nil if every matcher succeeds against the value. The first failure wins (reports the specific unmet expectation).

Takes []Matcher rather than MatcherList so callers can pass any named slice type whose underlying element is Matcher (e.g. ContainsList) without an explicit conversion at every call site.

Shared by the core check runner and out-of-tree verb plugins.

func MatchValueString

func MatchValueString(v any) string

MatchValueString coerces a matcher's stored Value (any) to a string. For numeric types it renders canonically; for everything else it falls back to fmt.Sprint.

Shared by the core check runner and out-of-tree verb plugins.

func MatchValueStrings

func MatchValueStrings(v any) []string

MatchValueStrings handles list-valued matchers like {contains: [a, b]}. A scalar value becomes a singleton list.

Shared by the core check runner and out-of-tree verb plugins.

Types

This section is empty.

Jump to

Keyboard shortcuts

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