diff --git a/cidr.go b/cidr.go index 0181a97..a106008 100644 --- a/cidr.go +++ b/cidr.go @@ -1,6 +1,9 @@ package pqtype -import "fmt" +import ( + "database/sql/driver" + "fmt" +) type CIDR Inet @@ -31,3 +34,7 @@ func (dst *CIDR) Scan(src interface{}) error { return fmt.Errorf("cannot scan %T", src) } + +func (src CIDR) Value() (driver.Value, error) { + return Inet(src).Value() +}