1
0
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:
Vladimir Mihailenco
2015-01-31 11:08:56 +02:00
parent d363cc72c5
commit 2dc61d458a
10 changed files with 182 additions and 89 deletions

View File

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