good morning!!!!

Skip to content
Snippets Groups Projects
Commit 712e105e authored by Peter Kieltyka's avatar Peter Kieltyka
Browse files

Fix StringArray scanner

parent d5c76f5a
No related branches found
No related tags found
No related merge requests found
...@@ -84,6 +84,9 @@ func (a *StringArray) Scan(src interface{}) error { ...@@ -84,6 +84,9 @@ func (a *StringArray) Scan(src interface{}) error {
return errors.New("Scan source was not []bytes") return errors.New("Scan source was not []bytes")
} }
s := string(b)[1 : len(b)-1] s := string(b)[1 : len(b)-1]
if s == "" {
return nil
}
results := strings.Split(s, ",") results := strings.Split(s, ",")
*a = StringArray(results) *a = StringArray(results)
return nil return nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment