rules

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustParse

func MustParse(s string) engine.Rule

MustParse converts a string into a Rule. MustParse panics if the string is not a valid rule.

func Parse

func Parse(s string) (engine.Rule, error)

Parse converts a string into a Rule.

Types

type RuleType

type RuleType string

A RuleType identifies a rule's logic.

const (
	// RuleTypeEverything ignores all differences between two attributes'
	// values.
	RuleTypeEverything RuleType = "everything"

	// RuleTypePrefix ignores a given prefix when comparing attribute values.
	RuleTypePrefix RuleType = "prefix"

	// RuleTypeWhitespace ignores differences in whitespace between two
	// attributes' values. Whitespace is as defined by unicode.IsSpace.
	RuleTypeWhitespace RuleType = "whitespace"
)

Jump to

Keyboard shortcuts

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