1
0
mirror of https://github.com/redis/go-redis.git synced 2025-06-14 01:21:30 +03:00

Allow setting and scaning interface{} values.

This commit is contained in:
Vladimir Mihailenco
2015-05-28 15:51:19 +03:00
parent 90888881b4
commit 3c1f2bd45a
10 changed files with 726 additions and 230 deletions

View File

@ -26,7 +26,7 @@ var _ = Describe("Command", func() {
Expect(client.Close()).NotTo(HaveOccurred())
})
It("should have a plain string result", func() {
It("should implement Stringer", func() {
set := client.Set("foo", "bar", 0)
Expect(set.String()).To(Equal("SET foo bar: OK"))
@ -117,6 +117,13 @@ var _ = Describe("Command", func() {
Expect(f).To(Equal(float64(10)))
})
It("Cmd should return string", func() {
cmd := redis.NewCmd("PING")
client.Process(cmd)
Expect(cmd.Err()).NotTo(HaveOccurred())
Expect(cmd.Val()).To(Equal("PONG"))
})
Describe("races", func() {
var C, N = 10, 1000
if testing.Short() {