package main import ( "fmt" "github.com/gomodule/redigo/redis" ) func main(){ conn,err:=redis.Dial("tcp","localhost:6379") if err!=nil{ fmt.Println("conn reids error") return } defer conn.Close() conn.Send("MULTI") conn.Send("INCR","foo") conn.Send("INCR","bar") r,err:=conn.Do("EXEC") fmt.Println(r) }
03-28
187
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-16
667
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-17
180
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)