forked from mirror/redis
script: fix small API inconsistency (backwards compatible).
This commit is contained in:
parent
90888881b4
commit
771ae5f899
|
@ -43,7 +43,7 @@ func (s *Script) EvalSha(c scripter, keys []string, args []string) *Cmd {
|
||||||
return c.EvalSha(s.hash, keys, args)
|
return c.EvalSha(s.hash, keys, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Script) Run(c *Client, keys []string, args []string) *Cmd {
|
func (s *Script) Run(c scripter, keys []string, args []string) *Cmd {
|
||||||
r := s.EvalSha(c, keys, args)
|
r := s.EvalSha(c, keys, args)
|
||||||
if err := r.Err(); err != nil && strings.HasPrefix(err.Error(), "NOSCRIPT ") {
|
if err := r.Err(); err != nil && strings.HasPrefix(err.Error(), "NOSCRIPT ") {
|
||||||
return s.Eval(c, keys, args)
|
return s.Eval(c, keys, args)
|
||||||
|
|
Loading…
Reference in New Issue