wildcard

package
v3.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wildcard

type Wildcard string

A string that supports globbing at its front and end. Ex: "kube-*" will match "kube-system" or "kube-public", "*-system" will match "kube-system" or "gatekeeper-system", "*system*" will match "system-kube" or "kube-system". The asterisk is required for wildcard matching.

func (Wildcard) Matches

func (w Wildcard) Matches(candidate string) bool

Matches returns true if the candidate parameter is either an exact match of the Wildcard, or if the Wildcard is a valid glob-match for the candidate. The Wildcard must start or end in a "*" to be considered a glob.

func (Wildcard) MatchesGenerateName

func (w Wildcard) MatchesGenerateName(candidate string) bool

Jump to

Keyboard shortcuts

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