testers

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 18 Imported by: 0 modules, 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

Overview

Package testers groups the tools for testing expressions.

Index

Constants

View Source
const MaxMatches = 10000

MaxMatches caps the listed matches.

View Source
const MaxXPathNodes = 10000

MaxXPathNodes caps the listed nodes.

View Source
const Regexp2Timeout = time.Second

Regexp2Timeout bounds each regexp2 match: backtracking can be exponential.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONPath added in v0.2.0

type JSONPath struct{}

JSONPath evaluates a JSONPath expression against a JSON document. The matches come out as a JSON array: ojg returns values, not positions in the input, so there are no Spans.

func (JSONPath) Run added in v0.2.0

func (p JSONPath) Run(ctx context.Context, req tool.Request) (tool.Result, error)

func (JSONPath) Spec added in v0.2.0

func (JSONPath) Spec() tool.Spec

type Regex

type Regex struct{}

Regex tests RE2 regular expressions against a text.

func (Regex) Run

func (r Regex) Run(ctx context.Context, req tool.Request) (tool.Result, error)

func (Regex) Spec

func (Regex) Spec() tool.Spec

type XPath added in v1.0.0

type XPath struct{}

XPath evaluates an XPath 1.0 expression (with antchfx extensions) on an XML document. Node sets come out one node per line; numbers, strings and booleans as the value.

func (XPath) Run added in v1.0.0

func (x XPath) Run(ctx context.Context, req tool.Request) (tool.Result, error)

func (XPath) Spec added in v1.0.0

func (XPath) Spec() tool.Spec

Jump to

Keyboard shortcuts

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