Skip to content

Commit 38aa0b7

Browse files
authored
fix(appendArg): appendArg case special type (redis#2489)
Signed-off-by: monkey92t <golang@88.com>
1 parent 5405540 commit 38aa0b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

commands.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ package redis
22

33
import (
44
"context"
5+
"encoding"
56
"errors"
67
"io"
8+
"net"
79
"reflect"
810
"strings"
911
"time"
@@ -75,6 +77,8 @@ func appendArg(dst []interface{}, arg interface{}) []interface{} {
7577
dst = append(dst, k, v)
7678
}
7779
return dst
80+
case time.Time, time.Duration, encoding.BinaryMarshaler, net.IP:
81+
return append(dst, arg)
7882
default:
7983
// scan struct field
8084
v := reflect.ValueOf(arg)

0 commit comments

Comments
 (0)