mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
feat: add WriteArg and Scan net.IP(#2062)
* feat: add WriteArg net.IP * feat: add Scan net.IP
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@ -106,6 +107,8 @@ func (w *Writer) WriteArg(v interface{}) error {
|
||||
return err
|
||||
}
|
||||
return w.bytes(b)
|
||||
case net.IP:
|
||||
return w.bytes(v)
|
||||
default:
|
||||
return fmt.Errorf(
|
||||
"redis: can't marshal %T (implement encoding.BinaryMarshaler)", v)
|
||||
|
Reference in New Issue
Block a user