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

Method EvalShaRO

script_server_sha_unit_test.go:89–103  ·  view source on GitHub ↗
(ctx context.Context, sha1 string, keys []string, args ...interface{})

Source from the content-addressed store, hash-verified

87}
88
89func (f *fakeScripter) EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *Cmd {
90 f.mu.Lock()
91 f.evalShaROCalls++
92 callNum := f.evalShaROCalls
93 fail := f.failFirstEvalShaROWithNoScr && callNum == 1
94 f.mu.Unlock()
95
96 cmd := NewCmd(ctx)
97 if fail {
98 cmd.SetErr(proto.RedisError("NOSCRIPT No matching script. Please use EVAL."))
99 return cmd
100 }
101 cmd.SetErr(nil)
102 return cmd
103}
104
105func TestNewScriptServerSHA_Run_UsesScriptLoadAndEvalSha_NoEval(t *testing.T) {
106 ctx := context.Background()

Callers

nothing calls this directly

Calls 3

RedisErrorTypeAlias · 0.92
NewCmdFunction · 0.85
SetErrMethod · 0.65

Tested by

no test coverage detected