mirror of
https://github.com/containers/podman.git
synced 2025-10-28 20:03:38 +08:00
Vendor vfkit v0.5.1 and gopsutil v3.24.1
Signed-off-by: Matt Heon <mheon@redhat.com>
This commit is contained in:
24
vendor/github.com/go-playground/validator/v10/validator.go
generated
vendored
24
vendor/github.com/go-playground/validator/v10/validator.go
generated
vendored
@ -112,6 +112,10 @@ func (v *validate) traverseField(ctx context.Context, parent reflect.Value, curr
|
||||
return
|
||||
}
|
||||
|
||||
if ct.typeof == typeOmitNil && (kind != reflect.Invalid && current.IsNil()) {
|
||||
return
|
||||
}
|
||||
|
||||
if ct.hasTag {
|
||||
if kind == reflect.Invalid {
|
||||
v.str1 = string(append(ns, cf.altName...))
|
||||
@ -233,6 +237,26 @@ OUTER:
|
||||
ct = ct.next
|
||||
continue
|
||||
|
||||
case typeOmitNil:
|
||||
v.slflParent = parent
|
||||
v.flField = current
|
||||
v.cf = cf
|
||||
v.ct = ct
|
||||
|
||||
switch field := v.Field(); field.Kind() {
|
||||
case reflect.Slice, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func:
|
||||
if field.IsNil() {
|
||||
return
|
||||
}
|
||||
default:
|
||||
if v.fldIsPointer && field.Interface() == nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
ct = ct.next
|
||||
continue
|
||||
|
||||
case typeEndKeys:
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user