script: fix small API inconsistency (backwards compatible).

This commit is contained in:
Vladimir Mihailenco 2015-06-11 17:17:06 +03:00
parent 90888881b4
commit 771ae5f899
1 changed files with 1 additions and 1 deletions

View File

@ -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)