Skip to content

Commit 084c0c8

Browse files
authored
Merge pull request #2174 from j178/master
Remove duplicate safe & unsafe
2 parents ce016ed + b50b1c8 commit 084c0c8

File tree

4 files changed

+4
-35
lines changed

4 files changed

+4
-35
lines changed

command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func cmdString(cmd Cmder, val interface{}) string {
104104
b = internal.AppendArg(b, val)
105105
}
106106

107-
return internal.String(b)
107+
return util.BytesToString(b)
108108
}
109109

110110
//------------------------------------------------------------------------------

internal/arg.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ import (
44
"fmt"
55
"strconv"
66
"time"
7+
8+
"github.com/go-redis/redis/v9/internal/util"
79
)
810

911
func AppendArg(b []byte, v interface{}) []byte {
1012
switch v := v.(type) {
1113
case nil:
1214
return append(b, "<nil>"...)
1315
case string:
14-
return appendUTF8String(b, Bytes(v))
16+
return appendUTF8String(b, util.StringToBytes(v))
1517
case []byte:
1618
return appendUTF8String(b, v)
1719
case int:

internal/safe.go

Lines changed: 0 additions & 12 deletions
This file was deleted.

internal/unsafe.go

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)