mirror of https://github.com/dmarkham/enumer.git
fixed bug: return error
This commit is contained in:
parent
9e56f9eb23
commit
0a3314337f
2
sql.go
2
sql.go
|
@ -10,7 +10,7 @@ const valuer = `func (i %[1]s) Value() (driver.Value, error) {
|
|||
const scanner = `func (i %[1]s) Scan(value interface{}) error {
|
||||
bytes, ok := value.([]byte)
|
||||
if !ok {
|
||||
fmt.Errorf("value is not a byte slice")
|
||||
return fmt.Errorf("value is not a byte slice")
|
||||
}
|
||||
|
||||
str := string(bytes[:])
|
||||
|
|
Loading…
Reference in New Issue