1
0
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:
Vladimir Mihailenco
2012-08-20 14:46:41 +03:00
parent 9ad848d04b
commit f56748aab9
4 changed files with 11 additions and 13 deletions

View File

@ -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
}