This repository was archived by the owner on Oct 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ require (
66 github.com/Selvatico/go-mocket v1.0.7
77 github.com/flyteorg/flyteidl v1.3.6
88 github.com/flyteorg/flytestdlib v1.0.15
9+ github.com/gofrs/uuid v4.2.0+incompatible
910 github.com/golang/glog v1.0.0
1011 github.com/golang/protobuf v1.5.2
1112 github.com/jackc/pgconn v1.10.1
1213 github.com/mitchellh/mapstructure v1.4.3
13- github.com/satori/go.uuid v1.2.0
1414 github.com/spf13/cobra v1.4.0
1515 github.com/spf13/pflag v1.0.5
1616 github.com/stretchr/testify v1.7.1
@@ -46,7 +46,6 @@ require (
4646 github.com/fsnotify/fsnotify v1.5.1 // indirect
4747 github.com/ghodss/yaml v1.0.0 // indirect
4848 github.com/go-logr/logr v0.4.0 // indirect
49- github.com/gofrs/uuid v4.2.0+incompatible // indirect
5049 github.com/golang-jwt/jwt/v4 v4.4.1 // indirect
5150 github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
5251 github.com/google/go-cmp v0.5.8 // indirect
Original file line number Diff line number Diff line change @@ -485,7 +485,6 @@ github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
485485github.com/rs/zerolog v1.13.0 /go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU =
486486github.com/rs/zerolog v1.15.0 /go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc =
487487github.com/russross/blackfriday/v2 v2.1.0 /go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM =
488- github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww =
489488github.com/satori/go.uuid v1.2.0 /go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0 =
490489github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 /go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4 =
491490github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ =
Original file line number Diff line number Diff line change 11package models
22
33import (
4- uuid "github.com/satori/go. uuid"
4+ "github.com/gofrs/ uuid"
55 "gorm.io/gorm"
66)
77
@@ -29,7 +29,11 @@ type PartitionKey struct {
2929// BeforeCreate so that we set the UUID in golang rather than from a DB function call
3030func (dataset * Dataset ) BeforeCreate (tx * gorm.DB ) error {
3131 if dataset .UUID == "" {
32- generated := uuid .NewV4 ()
32+ generated , err := uuid .NewV4 ()
33+ if err != nil {
34+ return err
35+ }
36+
3337 tx .Model (dataset ).Update ("UUID" , generated )
3438 }
3539 return nil
You can’t perform that action at this time.
0 commit comments