Use new simplified uuid.NewString() syntax

This commit is contained in:
Deluan
2021-02-01 01:22:31 -05:00
parent b47ec02f02
commit 861b406575
10 changed files with 17 additions and 32 deletions
+1 -2
View File
@@ -186,8 +186,7 @@ func (r sqlRepository) put(id string, m interface{}) (newId string, err error) {
}
// If does not have an id OR could not update (new record with predefined id)
if id == "" {
rand, _ := uuid.NewRandom()
id = rand.String()
id = uuid.NewString()
values["id"] = id
}
// It is a insert. if there was a created_at, add it back to args