MCPcopy
hub / github.com/prometheus/prometheus / zeroOrOneCharacterStringMatcher

Struct zeroOrOneCharacterStringMatcher

model/labels/regexp.go:1025–1027  ·  view source on GitHub ↗

zeroOrOneCharacterStringMatcher is a StringMatcher which matches zero or one occurrence of any character. The newline character is matches only if matchNL is set to true.

Source from the content-addressed store, hash-verified

1023// zeroOrOneCharacterStringMatcher is a StringMatcher which matches zero or one occurrence
1024// of any character. The newline character is matches only if matchNL is set to true.
1025type zeroOrOneCharacterStringMatcher struct {
1026 matchNL bool
1027}
1028
1029func (m *zeroOrOneCharacterStringMatcher) Matches(s string) bool {
1030 // If there's more than one rune in the string, then it can't match.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected