Merge pull request #123 from go-redis/fix/script-api-inconsistency

script: fix small API inconsistency (backwards compatible).
This commit is contained in:
Vladimir Mihailenco 2015-06-11 17:47:30 +03:00
commit 651d0b0662
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)