mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 05:21:58 +00:00
refactor: remove unnecessary lambda (noop)
This commit is contained in:
parent
3bfa9482fc
commit
4fb5f1a611
@ -121,12 +121,8 @@ func newRatchetingValueValidator(newValue, oldValue interface{}, args schemaArgs
|
|||||||
// that injects a ratchetingValueValidator to be used for all subkeys and subindices
|
// that injects a ratchetingValueValidator to be used for all subkeys and subindices
|
||||||
func (r *ratchetingValueValidator) getValidateOption() validate.Option {
|
func (r *ratchetingValueValidator) getValidateOption() validate.Option {
|
||||||
return func(svo *validate.SchemaValidatorOptions) {
|
return func(svo *validate.SchemaValidatorOptions) {
|
||||||
svo.NewValidatorForField = func(field string, schema *spec.Schema, rootSchema interface{}, root string, formats strfmt.Registry, opts ...validate.Option) validate.ValueValidator {
|
svo.NewValidatorForField = r.SubPropertyValidator
|
||||||
return r.SubPropertyValidator(field, schema, rootSchema, root, formats, opts...)
|
svo.NewValidatorForIndex = r.SubIndexValidator
|
||||||
}
|
|
||||||
svo.NewValidatorForIndex = func(index int, schema *spec.Schema, rootSchema interface{}, root string, formats strfmt.Registry, opts ...validate.Option) validate.ValueValidator {
|
|
||||||
return r.SubIndexValidator(index, schema, rootSchema, root, formats, opts...)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user