mirror of https://github.com/go-gorm/gorm.git
fix: database/sql.Scanner should not retain references (#6380)
This commit is contained in:
parent
661781a3d7
commit
7157b7e375
|
@ -170,10 +170,10 @@ func (data *EncryptedData) Scan(value interface{}) error {
|
||||||
return errors.New("Too short")
|
return errors.New("Too short")
|
||||||
}
|
}
|
||||||
|
|
||||||
*data = b[3:]
|
*data = append((*data)[0:], b[3:]...)
|
||||||
return nil
|
return nil
|
||||||
} else if s, ok := value.(string); ok {
|
} else if s, ok := value.(string); ok {
|
||||||
*data = []byte(s)[3:]
|
*data = []byte(s[3:])
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue