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"
|
import "github.com/vmihailenco/redis"
|
||||||
|
|
||||||
|
|
||||||
openConn := func() (io.ReadWriter, error) {
|
openConn := func() (io.ReadWriteCloser, error) {
|
||||||
fmt.Println("Connecting...")
|
fmt.Println("Connecting...")
|
||||||
return net.Dial("tcp", ":6379")
|
return net.Dial("tcp", ":6379")
|
||||||
}
|
}
|
||||||
|
|
||||||
closeConn := func(conn io.ReadWriter) error {
|
closeConn := func(conn io.ReadWriteCloser) error {
|
||||||
fmt.Println("Disconnecting...")
|
fmt.Println("Disconnecting...")
|
||||||
conn.Close()
|
conn.Close()
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue