Skip to content

Commit b71409d

Browse files
committed
test redispipeline
1 parent 75307ee commit b71409d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

redispipeline/pipeline.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
6+
"github.com/garyburd/redigo/redis"
7+
)
8+
9+
func main() {
10+
c, _ := redis.Dial("tcp", "localhost:6379")
11+
c.Send("MULTI")
12+
c.Send("INCR", "foo0")
13+
c.Send("INCR", "foo1")
14+
c.Send("INCR", "foo2")
15+
c.Send("INCR", "foo3")
16+
c.Send("HINCRBY", "map", "key1", "1")
17+
r, _ := c.Do("EXEC")
18+
fmt.Println(r)
19+
}

0 commit comments

Comments
 (0)