mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
Merge pull request #128796 from carlory/fix-framework-IgnoreNotFound
Fix a bug in framework.IgnoreNotFound
This commit is contained in:
commit
2b8b276de8
@ -97,7 +97,12 @@ func IgnoreNotFound(in any) any {
|
||||
inType := reflect.TypeOf(in)
|
||||
inValue := reflect.ValueOf(in)
|
||||
return reflect.MakeFunc(inType, func(args []reflect.Value) []reflect.Value {
|
||||
out := inValue.Call(args)
|
||||
var out []reflect.Value
|
||||
if inType.IsVariadic() {
|
||||
out = inValue.CallSlice(args)
|
||||
} else {
|
||||
out = inValue.Call(args)
|
||||
}
|
||||
if len(out) > 0 {
|
||||
lastValue := out[len(out)-1]
|
||||
last := lastValue.Interface()
|
||||
|
Loading…
Reference in New Issue
Block a user