mirror of
https://github.com/redis/go-redis.git
synced 2025-06-12 14:21:52 +03:00
Refactor Set, SetNX and SetXX with expiration.
This commit is contained in:
@ -25,12 +25,12 @@ var _ = Describe("Pipelining", func() {
|
||||
})
|
||||
|
||||
It("should pipeline", func() {
|
||||
set := client.Set("key2", "hello2")
|
||||
set := client.Set("key2", "hello2", 0)
|
||||
Expect(set.Err()).NotTo(HaveOccurred())
|
||||
Expect(set.Val()).To(Equal("OK"))
|
||||
|
||||
pipeline := client.Pipeline()
|
||||
set = pipeline.Set("key1", "hello1")
|
||||
set = pipeline.Set("key1", "hello1", 0)
|
||||
get := pipeline.Get("key2")
|
||||
incr := pipeline.Incr("key3")
|
||||
getNil := pipeline.Get("key4")
|
||||
|
Reference in New Issue
Block a user