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

Function captureCmdable

string_commands_unit_test.go:12–17  ·  view source on GitHub ↗

captureCmdable returns a cmdable that records the Cmder passed to it without dispatching the command. Used to assert that command builders produce the expected argument list.

(out *Cmder)

Source from the content-addressed store, hash-verified

10// dispatching the command. Used to assert that command builders produce the
11// expected argument list.
12func captureCmdable(out *Cmder) cmdable {
13 return func(_ context.Context, cmd Cmder) error {
14 *out = cmd
15 return nil
16 }
17}
18
19func TestIncrEXInt_Args(t *testing.T) {
20 tests := []struct {

Callers 4

TestXTrim_LimitArgsFunction · 0.85
TestXAdd_TrimLimitArgsFunction · 0.85
TestIncrEXInt_ArgsFunction · 0.85
TestIncrEXFloat_ArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected