matchpattern

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FQDN

func FQDN(s string) string

FQDN returns the fully qualified domain name from s. If s is already fully qualified, it behaves as the identity function.

func Sanitize

func Sanitize(pattern string) string

Sanitize canonicalized the pattern for use by ToRegexp

func ToRegexp

func ToRegexp(pattern string) string

ToRegexp converts a MatchPattern field into a regexp string. It does not validate the pattern. It supports: * to select 0 or more DNS valid characters

func Validate

func Validate(pattern string) (matcher *regexp.Regexp, err error)

Validate ensures that pattern is a parseable matchPattern. It returns the regexp generated when validating.

func ValidateWithoutCache

func ValidateWithoutCache(pattern string) (matcher *regexp.Regexp, err error)

ValidateWithoutCache is the same as Validate() but doesn't consult the regex LRU.

Types

This section is empty.

Jump to

Keyboard shortcuts

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