Fix panic on error (#20377)

This commit is contained in:
Chris S. Kim 2024-01-29 12:44:13 -05:00 committed by GitHub
parent 0ca7313b07
commit a2d50af1bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ func SingleValueFromOneOrTwoArgs[T1 any, T2 any](indexer func(value T1, optional
case 1:
val, ok := args[0].(T1)
if !ok {
return nil, fmt.Errorf("expected first argument type of %T, got: %T", value, args[1])
return nil, fmt.Errorf("expected first argument type of %T, got: %T", value, args[0])
}
value = val
default: