mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Accept interface{} in Eval. Fixes #243.
This commit is contained in:
@ -288,7 +288,7 @@ func ExampleScript() {
|
||||
return false
|
||||
`)
|
||||
|
||||
n, err := IncrByXX.Run(client, []string{"xx_counter"}, []string{"2"}).Result()
|
||||
n, err := IncrByXX.Run(client, []string{"xx_counter"}, 2).Result()
|
||||
fmt.Println(n, err)
|
||||
|
||||
err = client.Set("xx_counter", "40", 0).Err()
|
||||
@ -296,7 +296,7 @@ func ExampleScript() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
n, err = IncrByXX.Run(client, []string{"xx_counter"}, []string{"2"}).Result()
|
||||
n, err = IncrByXX.Run(client, []string{"xx_counter"}, 2).Result()
|
||||
fmt.Println(n, err)
|
||||
|
||||
// Output: <nil> redis: nil
|
||||
|
Reference in New Issue
Block a user