mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
Add remove label command
This commit is contained in:
@@ -55,6 +55,11 @@ func (v *FakeValidator) MakeLabelValidator() func(map[string]string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MakeLabelNameValidator returns a nil function
|
||||
func (v *FakeValidator) MakeLabelNameValidator() func([]string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ValidateNamespace validates namespace by regexp
|
||||
func (v *FakeValidator) ValidateNamespace(s string) []string {
|
||||
pattern := regexp.MustCompile(`^[a-zA-Z].*`)
|
||||
@@ -75,6 +80,14 @@ func (v *FakeValidator) Validator(_ map[string]string) error {
|
||||
return errors.New(SAD)
|
||||
}
|
||||
|
||||
func (v *FakeValidator) ValidatorArray(_ []string) error {
|
||||
v.called = true
|
||||
if v.happy {
|
||||
return nil
|
||||
}
|
||||
return errors.New(SAD)
|
||||
}
|
||||
|
||||
// VerifyCall returns true if Validator was used.
|
||||
func (v *FakeValidator) VerifyCall() {
|
||||
if !v.called {
|
||||
|
||||
Reference in New Issue
Block a user