mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Use net.Conn instead of io.ReadWriteCloser.
This commit is contained in:
@ -38,12 +38,12 @@ Example 2:
|
||||
import "github.com/vmihailenco/redis"
|
||||
|
||||
|
||||
openConn := func() (io.ReadWriteCloser, error) {
|
||||
openConn := func() (net.Conn, error) {
|
||||
fmt.Println("Connecting...")
|
||||
return net.Dial("tcp", ":6379")
|
||||
}
|
||||
|
||||
closeConn := func(conn io.ReadWriteCloser) error {
|
||||
closeConn := func(conn net.Conn) error {
|
||||
fmt.Println("Disconnecting...")
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user