1
0
mirror of https://github.com/redis/go-redis.git synced 2025-04-19 07:22:17 +03:00

fix(appendArg): appendArg case special type (#2489)

Signed-off-by: monkey92t <golang@88.com>
This commit is contained in:
Monkey 2023-03-23 00:30:20 +08:00 committed by GitHub
parent 540554043b
commit 38aa0b7792
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,8 +2,10 @@ package redis
import ( import (
"context" "context"
"encoding"
"errors" "errors"
"io" "io"
"net"
"reflect" "reflect"
"strings" "strings"
"time" "time"
@ -75,6 +77,8 @@ func appendArg(dst []interface{}, arg interface{}) []interface{} {
dst = append(dst, k, v) dst = append(dst, k, v)
} }
return dst return dst
case time.Time, time.Duration, encoding.BinaryMarshaler, net.IP:
return append(dst, arg)
default: default:
// scan struct field // scan struct field
v := reflect.ValueOf(arg) v := reflect.ValueOf(arg)