@@ -8,17 +8,17 @@ import (
88 "strings"
99)
1010
11- type scripter interface {
11+ type Scripter interface {
1212 Eval (ctx context.Context , script string , keys []string , args ... interface {}) * Cmd
1313 EvalSha (ctx context.Context , sha1 string , keys []string , args ... interface {}) * Cmd
1414 ScriptExists (ctx context.Context , hashes ... string ) * BoolSliceCmd
1515 ScriptLoad (ctx context.Context , script string ) * StringCmd
1616}
1717
1818var (
19- _ scripter = (* Client )(nil )
20- _ scripter = (* Ring )(nil )
21- _ scripter = (* ClusterClient )(nil )
19+ _ Scripter = (* Client )(nil )
20+ _ Scripter = (* Ring )(nil )
21+ _ Scripter = (* ClusterClient )(nil )
2222)
2323
2424type Script struct {
@@ -38,25 +38,25 @@ func (s *Script) Hash() string {
3838 return s .hash
3939}
4040
41- func (s * Script ) Load (ctx context.Context , c scripter ) * StringCmd {
41+ func (s * Script ) Load (ctx context.Context , c Scripter ) * StringCmd {
4242 return c .ScriptLoad (ctx , s .src )
4343}
4444
45- func (s * Script ) Exists (ctx context.Context , c scripter ) * BoolSliceCmd {
45+ func (s * Script ) Exists (ctx context.Context , c Scripter ) * BoolSliceCmd {
4646 return c .ScriptExists (ctx , s .hash )
4747}
4848
49- func (s * Script ) Eval (ctx context.Context , c scripter , keys []string , args ... interface {}) * Cmd {
49+ func (s * Script ) Eval (ctx context.Context , c Scripter , keys []string , args ... interface {}) * Cmd {
5050 return c .Eval (ctx , s .src , keys , args ... )
5151}
5252
53- func (s * Script ) EvalSha (ctx context.Context , c scripter , keys []string , args ... interface {}) * Cmd {
53+ func (s * Script ) EvalSha (ctx context.Context , c Scripter , keys []string , args ... interface {}) * Cmd {
5454 return c .EvalSha (ctx , s .hash , keys , args ... )
5555}
5656
5757// Run optimistically uses EVALSHA to run the script. If script does not exist
5858// it is retried using EVAL.
59- func (s * Script ) Run (ctx context.Context , c scripter , keys []string , args ... interface {}) * Cmd {
59+ func (s * Script ) Run (ctx context.Context , c Scripter , keys []string , args ... interface {}) * Cmd {
6060 r := s .EvalSha (ctx , c , keys , args ... )
6161 if err := r .Err (); err != nil && strings .HasPrefix (err .Error (), "NOSCRIPT " ) {
6262 return s .Eval (ctx , c , keys , args ... )
0 commit comments