diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-04-10 00:14:11 +0200 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-04-10 00:14:11 +0200 |
commit | 49f7be2a35539bae2d43594c9b39268eec7837d0 (patch) | |
tree | 69b43e7ce19522b26e57bb1e82a51e9a03ee7523 /model/uuid.go | |
parent | c60dd3357fc84e14795f5f864e9fa9ce7150179f (diff) |
Time !
Diffstat (limited to 'model/uuid.go')
-rw-r--r-- | model/uuid.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/model/uuid.go b/model/uuid.go index f072d92..8852cc8 100644 --- a/model/uuid.go +++ b/model/uuid.go @@ -9,13 +9,13 @@ type UUID struct { payload uuid.UUID
}
-func NewUUID() UUID {
+func MakeUUID() UUID {
id, _ := uuid.NewRandom()
return UUID { payload: id }
}
func (self UUID) Value() (sqldriver.Value, error) {
- return self.payload.MarshalBinary()
+ return self.payload[:], nil
}
func (self *UUID) Scan(value any) error {
|