Skip to content

Commit

Permalink
fix : uuid null string
Browse files Browse the repository at this point in the history
  • Loading branch information
sutantodadangfit committed May 31, 2023
1 parent 0d17824 commit 96ba80f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions string.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ func (ns *NullString) Scan(value interface{}) error {
return errors.New("type assertion to *RawBytes is failed")
}

*s = append((*s)[:0], []byte(ns.String)...)
var myRaw RawBytes

ns.String, ns.Valid = string(*s), true
myRaw = append((myRaw)[:0], *s...)

ns.String, ns.Valid = string(myRaw), true

return nil
}
Expand Down

0 comments on commit 96ba80f

Please sign in to comment.