MCPcopy
hub / github.com/akuity/kargo / Matcher

Interface Matcher

pkg/pattern/matcher.go:20–25  ·  view source on GitHub ↗

Matcher is an interface that defines a method for matching strings against a specific pattern. It can be implemented by different types of patterns, such as glob patterns, regular expressions, or base directory patterns.

Source from the content-addressed store, hash-verified

18// specific pattern. It can be implemented by different types of patterns, such
19// as glob patterns, regular expressions, or base directory patterns.
20type Matcher interface {
21 // Matches checks if the given string matches the pattern.
22 Matches(string) bool
23 // String returns the string representation of the pattern.
24 String() string
25}
26
27// ParseNamePattern parses a pattern string and returns a Matcher.
28// It recognizes glob patterns (with "glob:" prefix), regular expressions (with

Callers 14

TestGetShardRequirementFunction · 0.65
MatchesPathsMethod · 0.65
autoPromotionAllowedMethod · 0.65
MatchesMethod · 0.65
TestMatchersFunction · 0.65
TestGlobMatcherFunction · 0.65
mainFunction · 0.65
fetchBestReleasesFunction · 0.65
generateNameMethod · 0.65
GetMethod · 0.65
getCredentialsSecretMethod · 0.65
TestGetFunction · 0.65

Implementers 4

GlobMatcherpkg/pattern/matcher.go
RegexpMatcherpkg/pattern/matcher.go
BaseDirMatcherpkg/pattern/matcher.go
ExactMatcherpkg/pattern/matcher.go

Calls

no outgoing calls

Tested by

no test coverage detected