mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
fix: place '-' as last character in regex class
This commit is contained in:
@@ -148,8 +148,8 @@ func (p *plugin) findContainers(obj map[string]interface{}) error {
|
||||
}
|
||||
|
||||
func isImageMatched(s, t string) bool {
|
||||
// Tag values are limited to [a-zA-Z0-9_.-{}].
|
||||
pattern, _ := regexp.Compile("^" + t + "(@sha256)?(:[a-zA-Z0-9_.-{}]*)?$")
|
||||
// Tag values are limited to [a-zA-Z0-9_.{}-].
|
||||
pattern, _ := regexp.Compile("^" + t + "(@sha256)?(:[a-zA-Z0-9_.{}-]*)?$")
|
||||
return pattern.MatchString(s)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user