mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Script: Fix Exists
to use hash instead of source (#726)
`SCRIPT EXISTS` accepts a hash, not the raw source: https://redis.io/commands/script-exists
This commit is contained in:
committed by
Vladimir Mihailenco
parent
d0a2b8bdf3
commit
7acec74c59
@ -10,7 +10,7 @@ import (
|
||||
type scripter interface {
|
||||
Eval(script string, keys []string, args ...interface{}) *Cmd
|
||||
EvalSha(sha1 string, keys []string, args ...interface{}) *Cmd
|
||||
ScriptExists(scripts ...string) *BoolSliceCmd
|
||||
ScriptExists(hashes ...string) *BoolSliceCmd
|
||||
ScriptLoad(script string) *StringCmd
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ func (s *Script) Load(c scripter) *StringCmd {
|
||||
}
|
||||
|
||||
func (s *Script) Exists(c scripter) *BoolSliceCmd {
|
||||
return c.ScriptExists(s.src)
|
||||
return c.ScriptExists(s.hash)
|
||||
}
|
||||
|
||||
func (s *Script) Eval(c scripter, keys []string, args ...interface{}) *Cmd {
|
||||
|
Reference in New Issue
Block a user