MCPcopy
hub / github.com/redis/go-redis / appendArgs

Function appendArgs

commands.go:53–65  ·  view source on GitHub ↗
(dst, src []interface{})

Source from the content-addressed store, hash-verified

51}
52
53func appendArgs(dst, src []interface{}) []interface{} {
54 if len(src) == 1 {
55 return appendArg(dst, src[0])
56 }
57
58 if cap(dst) < len(dst)+len(src) {
59 newDst := make([]interface{}, len(dst), len(dst)+len(src))
60 copy(newDst, dst)
61 dst = newDst
62 }
63 dst = append(dst, src...)
64 return dst
65}
66
67func appendArg(dst []interface{}, arg interface{}) []interface{} {
68 switch arg := arg.(type) {

Callers 15

BitFieldMethod · 0.85
ZRemMethod · 0.85
SAddMethod · 0.85
SMIsMemberMethod · 0.85
SRemMethod · 0.85
CMSIncrByMethod · 0.85
TopKAddMethod · 0.85
TopKQueryMethod · 0.85
TopKCountMethod · 0.85
TopKIncrByMethod · 0.85
LPushMethod · 0.85
LPushXMethod · 0.85

Calls 1

appendArgFunction · 0.70

Tested by

no test coverage detected