matching

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package matching implements exact platform-neutral selector matching over a normalized hierarchy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(root *hierarchy.Element, selector model.ElementSelector) ([]*hierarchy.Element, error)

Find returns matching elements in deterministic hierarchy order.

func Refresh

func Refresh(root, previous *hierarchy.Element) (*hierarchy.Element, error)

Refresh finds the unique current element whose attributes equal the previous element's attributes after excluding bounds.

Types

type RefreshError

type RefreshError struct {
	Matches int
}

RefreshError reports that refresh-by-attributes did not identify one node.

func (*RefreshError) Error

func (e *RefreshError) Error() string

type RegexError

type RegexError struct {
	Field   string
	Pattern string
	Err     error
}

RegexError identifies an invalid selector expression without panicking.

func (*RegexError) Error

func (e *RegexError) Error() string

func (*RegexError) Unwrap

func (e *RegexError) Unwrap() error

Jump to

Keyboard shortcuts

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