File tree Expand file tree Collapse file tree 3 files changed +3
-15
lines changed Expand file tree Collapse file tree 3 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -617,11 +617,7 @@ import (
617617type {{.GoName}} string
618618
619619func (e *{{.GoName}}) Scan(v interface{}) error {
620- bytes, ok := v.([]byte)
621- if !ok {
622- return err
623- }
624- *e = {{.GoName}}(string(bytes))
620+ *e = {{.GoName}}(string(v.([]byte)))
625621 return nil
626622}
627623
Original file line number Diff line number Diff line change @@ -10,11 +10,7 @@ import (
1010type StatusEnum string
1111
1212func (e * StatusEnum ) Scan (v interface {}) error {
13- bytes , ok := v .([]byte )
14- if ! ok {
15- return err
16- }
17- * e = StatusEnum (string (bytes ))
13+ * e = StatusEnum (string (v .([]byte )))
1814 return nil
1915}
2016
Original file line number Diff line number Diff line change @@ -10,11 +10,7 @@ import (
1010type StatusEnum string
1111
1212func (e * StatusEnum ) Scan (v interface {}) error {
13- bytes , ok := v .([]byte )
14- if ! ok {
15- return err
16- }
17- * e = StatusEnum (string (bytes ))
13+ * e = StatusEnum (string (v .([]byte )))
1814 return nil
1915}
2016
You can’t perform that action at this time.
0 commit comments