mirror of https://github.com/go-redis/redis.git
readme: Fix example.
This commit is contained in:
parent
2f4156dd04
commit
d2e8ee8bf8
|
@ -53,12 +53,12 @@ Example 2:
|
|||
import "github.com/vmihailenco/redis"
|
||||
|
||||
|
||||
openConn := func() (io.ReadWriter, error) {
|
||||
openConn := func() (io.ReadWriteCloser, error) {
|
||||
fmt.Println("Connecting...")
|
||||
return net.Dial("tcp", ":6379")
|
||||
}
|
||||
|
||||
closeConn := func(conn io.ReadWriter) error {
|
||||
closeConn := func(conn io.ReadWriteCloser) error {
|
||||
fmt.Println("Disconnecting...")
|
||||
conn.Close()
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue