MCPcopy Create free account
hub / github.com/docker/secrets-engine / isValidComponentMatcher

Function isValidComponentMatcher

x/secrets/pattern.go:63–74  ·  view source on GitHub ↗
(componentLen, wildcardLen int)

Source from the content-addressed store, hash-verified

61}
62
63func isValidComponentMatcher(componentLen, wildcardLen int) bool {
64 if wildcardLen > 2 {
65 // No more than two wildcards per component
66 return false
67 }
68 if wildcardLen > 0 && wildcardLen != componentLen {
69 // Wildcard can't be mixed with other characters in the same component
70 return false
71 }
72 // Component must not be empty
73 return componentLen > 0
74}
75
76func isValidPatternRune(c rune) bool {
77 return isValidRune(c) || c == '*'

Callers 1

validPatternFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected