Browse Source

disconnect tcp conn no data last 60 s

ls 4 years ago
parent
commit
107022583a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      types/numeric.go

+ 2 - 2
types/numeric.go

@@ -32,7 +32,7 @@ func (n *NullInt) Scan(src interface{}) error {
 }
 
 // NullFloat is an implementation of a int for the MySQL type numeric ....
-type NullFloat float64
+type NullFloat float32
 
 // Value implements the driver.Valuer interface,
 // and turns the bytes into a integer for MySQL storage.
@@ -44,7 +44,7 @@ func (n NullFloat) Value() (driver.Value, error) {
 // and turns the bytes incoming from MySQL into a numeric
 func (n *NullFloat) Scan(src interface{}) error {
 	if src != nil {
-		v, ok := src.(float64)
+		v, ok := src.(float32)
 		if !ok {
 			*n = NullFloat(0)
 			return nil