1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-22 10:01:50 +03:00

fix: Fix panic caused when arg is nil (#3353)

This commit is contained in:
frankj
2025-04-23 15:47:13 +08:00
committed by Nedyalko Dyakov
parent b203bfdfa3
commit adb479820c
2 changed files with 24 additions and 0 deletions

View File

@ -81,6 +81,8 @@ func appendArg(dst []interface{}, arg interface{}) []interface{} {
return dst
case time.Time, time.Duration, encoding.BinaryMarshaler, net.IP:
return append(dst, arg)
case nil:
return dst
default:
// scan struct field
v := reflect.ValueOf(arg)