mirror of https://github.com/go-gorm/gorm.git
fixed golint issues
This commit is contained in:
parent
3b6d790e93
commit
fce49136e8
|
@ -121,15 +121,15 @@ type EncryptedData []byte
|
||||||
|
|
||||||
func (data *EncryptedData) Scan(value interface{}) error {
|
func (data *EncryptedData) Scan(value interface{}) error {
|
||||||
if b, ok := value.([]byte); ok {
|
if b, ok := value.([]byte); ok {
|
||||||
if len(b) < 3 || b[0] != '*' || b[1] != '*' || b[2] != '*'{
|
if len(b) < 3 || b[0] != '*' || b[1] != '*' || b[2] != '*' {
|
||||||
return errors.New("Too short")
|
return errors.New("Too short")
|
||||||
}
|
}
|
||||||
|
|
||||||
*data = b[3:]
|
*data = b[3:]
|
||||||
return nil
|
return nil
|
||||||
} else {
|
|
||||||
return errors.New("Bytes expected")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return errors.New("Bytes expected")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (data EncryptedData) Value() (driver.Value, error) {
|
func (data EncryptedData) Value() (driver.Value, error) {
|
||||||
|
|
Loading…
Reference in New Issue