From f730fd67af2e66a87b250f646d9b46faefe80420 Mon Sep 17 00:00:00 2001 From: Vladan Marsenic Date: Wed, 25 Mar 2020 15:02:27 +0100 Subject: [PATCH 1/4] ECOMDEV-6770 feat: add flag that indicates if customer profile is complete --- customer/customer.go | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/customer/customer.go b/customer/customer.go index e00a25f..6dd151f 100644 --- a/customer/customer.go +++ b/customer/customer.go @@ -42,24 +42,25 @@ type CountryCode string // TOP LEVEL OBJECT // private, so that changes are limited by API type Customer struct { - BsonId bson.ObjectId `bson:"_id,omitempty"` - Id string // Email is used as LoginID, but can change. This is never changes! - ExternalID string - unlinkDB bool // if true, changes to Customer are not stored in database - Flags *Flags - Version *version.Version - CreatedAt time.Time - LastModifiedAt time.Time - Email string // unique, used as Login Credential - Person *address.Person - IsGuest bool - IsLoggedIn bool - Company *Company - Addresses []*address.Address - Localization *Localization - TacAgree bool // Terms and Conditions - Tracking *Tracking - Custom interface{} + BsonId bson.ObjectId `bson:"_id,omitempty"` + Id string // Email is used as LoginID, but can change. This is never changes! + ExternalID string + unlinkDB bool // if true, changes to Customer are not stored in database + Flags *Flags + Version *version.Version + CreatedAt time.Time + LastModifiedAt time.Time + Email string // unique, used as Login Credential + Person *address.Person + IsGuest bool + IsLoggedIn bool + Company *Company + Addresses []*address.Address + Localization *Localization + TacAgree bool // Terms and Conditions + Tracking *Tracking + IsProfileComplete bool + Custom interface{} } type Tracking struct { From 9032a05d4e68d29efdb585cbd718ab6874a9798f Mon Sep 17 00:00:00 2001 From: Vladan Marsenic Date: Sun, 26 Apr 2020 19:51:40 +0200 Subject: [PATCH 2/4] ECOMDEV-6187 feat: add address validation --- address/address.go | 65 +++++++++--- address/address_person_migration_test.go | 20 ++-- address/address_test.go | 120 +++++++++++++++++++++++ go.mod | 1 + go.sum | 2 + 5 files changed, 182 insertions(+), 26 deletions(-) create mode 100644 address/address_test.go diff --git a/address/address.go b/address/address.go index 14cc632..ed009ff 100644 --- a/address/address.go +++ b/address/address.go @@ -1,5 +1,13 @@ package address +import ( + "errors" + "fmt" + "gopkg.in/validator.v2" + "reflect" + "strconv" +) + type AddressType string type ContactType string type SalutationType string @@ -34,17 +42,17 @@ const ( ) type Address struct { - Id string // is automatically set on AddAddress() - ExternalID string - Person *Person - Type AddressType - Street string - StreetNumber string - ZIP string - City string - Country string - CountryCode string - Company string + Id string `validate:"nonzero"` // is automatically set on AddAddress() + ExternalID string `validate:"nonzero"` + Person *Person `validate:"nonzero"` + Type AddressType `validate:"nonzero"` + Street string `validate:"nonzero, min=2, max=189"` + StreetNumber string `validate:"nonzero, max=60"` + ZIP string `validate:"nonzero, min=4,max=5"` + City string `validate:"nonzero, min=3,max=60"` + Country string `validate:"nonzero"` + CountryCode string `validate:"nonzero"` + Company string `validate:"max=250"` Department string Building string PostOfficeBox string @@ -55,13 +63,13 @@ type Address struct { // Person is a field Customer and of Address // Only Customer->Person has Contacts type Person struct { - FirstName string + FirstName string `validate:"nonzero, max=60"` MiddleName string - LastName string + LastName string `validate:"nonzero, max=60"` Title TitleType - Salutation SalutationType + Salutation SalutationType `validate:"nonzero"` Birthday string - Contacts map[string]*Contact // key must be contactID + Contacts map[string]*Contact `validate:"vpMax=250"` // key must be contactID DefaultContacts map[ContactType]string // reference by contactID } @@ -97,3 +105,30 @@ func (address *Address) Equals(otherAddress *Address) bool { return equal } + +// validatePhoneMax validates Contacts. If there os contact with type Phone present, it checks for maximum characters length +func validatePhoneMax(v interface{}, param string) error { + max, _ := strconv.Atoi(param) + st := reflect.ValueOf(v) + keys := st.MapKeys() + for _, key := range keys { + v := st.MapIndex(key) + ttype := v.Interface().(*Contact).Type + value := v.Interface().(*Contact).Value + if ttype == "" { + return errors.New("type must be set") + } + if ttype == ContactTypePhone { + if len(value) > max { + return fmt.Errorf("phone cannot be longer then %d characters", max) + } + } + } + return nil +} + +// IsValid checks if address contents are valid based on validation specified +func (address *Address) Validate() error { + validator.SetValidationFunc("vpMax", validatePhoneMax) + return validator.Validate(address) +} diff --git a/address/address_person_migration_test.go b/address/address_person_migration_test.go index aaa7b86..a26a4ab 100644 --- a/address/address_person_migration_test.go +++ b/address/address_person_migration_test.go @@ -43,18 +43,16 @@ func TestPersonContactsMigration(t *testing.T) { FirstName: "Max", LastName: "Mustermann", Birthday: "1973-12-22", - Contacts: []*Contact{ - &Contact{ - ID: unique.GetNewIDShortID(), - IsDefault: true, - Type: ContactTypeEmail, - Value: "foo@example.com", + Contacts: map[string]*Contact{ + "1": { + ID: unique.GetNewIDShortID(), + Type: ContactTypeEmail, + Value: "foo@example.com", }, - &Contact{ - ID: unique.GetNewIDShortID(), - IsDefault: true, - Type: ContactTypePhone, - Value: "+49 1234 56 78 990", + "2": { + ID: unique.GetNewIDShortID(), + Type: ContactTypePhone, + Value: "+49 1234 56 78 990", }, }, } diff --git a/address/address_test.go b/address/address_test.go new file mode 100644 index 0000000..d461a27 --- /dev/null +++ b/address/address_test.go @@ -0,0 +1,120 @@ +package address + +import ( + "math/rand" + "testing" + "time" +) + +type fields struct { + Id string + ExternalID string + Person *Person + Type AddressType + Street string + StreetNumber string + ZIP string + City string + Country string + CountryCode string + Company string +} + +func TestAddress_Validate(t *testing.T) { + + rand.Seed(time.Now().UnixNano()) + + tests := []struct { + name string + fields fields + wantErr bool + }{ + { + "valid address", + validAddressFields(), + false, + }, + { + "invalid person phone", + invalidPersonContactsPhoneGt250(), + true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + address := &Address{ + Id: tt.fields.Id, + ExternalID: tt.fields.ExternalID, + Person: tt.fields.Person, + Type: tt.fields.Type, + Street: tt.fields.Street, + StreetNumber: tt.fields.StreetNumber, + ZIP: tt.fields.ZIP, + City: tt.fields.City, + Country: tt.fields.Country, + CountryCode: tt.fields.CountryCode, + Company: tt.fields.Company, + } + if err := address.Validate(); (err != nil) != tt.wantErr { + t.Errorf("Validate() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} + +var letters = []rune("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") + +func randSeq(n int) string { + b := make([]rune, n) + for i := range b { + b[i] = letters[rand.Intn(len(letters))] + } + return string(b) +} + +func invalidPersonContactsPhoneGt250() fields { + f := validAddressFields() + f.Person = validPerson() + f.Person.SetPhone(randSeq(255)) + return f +} + +func validAddressFields() fields { + return fields{ + Id: randSeq(10), + ExternalID: randSeq(10), + Person: &Person{ + FirstName: randSeq(10), + LastName: randSeq(10), + Salutation: SalutationTypeMr, + Contacts: map[string]*Contact{ + randSeq(10): { + Type: ContactTypePhone, + Value: randSeq(10), + }, + }, + }, + Type: AddressDefaultBilling, + Street: randSeq(10), + StreetNumber: randSeq(10), + ZIP: randSeq(4), + City: randSeq(10), + Country: randSeq(10), + CountryCode: randSeq(10), + Company: randSeq(10), + } +} + +func validPerson() *Person { + return &Person{ + FirstName: randSeq(10), + LastName: randSeq(10), + Salutation: SalutationTypeMr, + Contacts: map[string]*Contact{ + randSeq(10): { + Type: ContactTypePhone, + Value: randSeq(10), + }, + }, + } +} diff --git a/go.mod b/go.mod index 17e457c..f6d2a00 100644 --- a/go.mod +++ b/go.mod @@ -22,4 +22,5 @@ require ( golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce + gopkg.in/validator.v2 v2.0.0-20191107172027-c3144fdedc21 ) diff --git a/go.sum b/go.sum index d1483a5..2368b20 100644 --- a/go.sum +++ b/go.sum @@ -45,5 +45,7 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogR gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce h1:xcEWjVhvbDy+nHP67nPDDpbYrY+ILlfndk4bRioVHaU= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/validator.v2 v2.0.0-20191107172027-c3144fdedc21 h1:2QQcyaEBdpfjjYkF0MXc69jZbHb4IOYuXz2UwsmVM8k= +gopkg.in/validator.v2 v2.0.0-20191107172027-c3144fdedc21/go.mod h1:o4V0GXN9/CAmCsvJ0oXYZvrZOe7syiDZSN1GWGZTGzc= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 4caca84ec19c9e50158f15450168b804c9209e86 Mon Sep 17 00:00:00 2001 From: Vladan Marsenic Date: Mon, 27 Apr 2020 13:33:27 +0200 Subject: [PATCH 3/4] ECOMDEV-6187 feat: remove address validation --- address/address.go | 65 +++++++++++----------------------------------- 1 file changed, 15 insertions(+), 50 deletions(-) diff --git a/address/address.go b/address/address.go index ed009ff..14cc632 100644 --- a/address/address.go +++ b/address/address.go @@ -1,13 +1,5 @@ package address -import ( - "errors" - "fmt" - "gopkg.in/validator.v2" - "reflect" - "strconv" -) - type AddressType string type ContactType string type SalutationType string @@ -42,17 +34,17 @@ const ( ) type Address struct { - Id string `validate:"nonzero"` // is automatically set on AddAddress() - ExternalID string `validate:"nonzero"` - Person *Person `validate:"nonzero"` - Type AddressType `validate:"nonzero"` - Street string `validate:"nonzero, min=2, max=189"` - StreetNumber string `validate:"nonzero, max=60"` - ZIP string `validate:"nonzero, min=4,max=5"` - City string `validate:"nonzero, min=3,max=60"` - Country string `validate:"nonzero"` - CountryCode string `validate:"nonzero"` - Company string `validate:"max=250"` + Id string // is automatically set on AddAddress() + ExternalID string + Person *Person + Type AddressType + Street string + StreetNumber string + ZIP string + City string + Country string + CountryCode string + Company string Department string Building string PostOfficeBox string @@ -63,13 +55,13 @@ type Address struct { // Person is a field Customer and of Address // Only Customer->Person has Contacts type Person struct { - FirstName string `validate:"nonzero, max=60"` + FirstName string MiddleName string - LastName string `validate:"nonzero, max=60"` + LastName string Title TitleType - Salutation SalutationType `validate:"nonzero"` + Salutation SalutationType Birthday string - Contacts map[string]*Contact `validate:"vpMax=250"` // key must be contactID + Contacts map[string]*Contact // key must be contactID DefaultContacts map[ContactType]string // reference by contactID } @@ -105,30 +97,3 @@ func (address *Address) Equals(otherAddress *Address) bool { return equal } - -// validatePhoneMax validates Contacts. If there os contact with type Phone present, it checks for maximum characters length -func validatePhoneMax(v interface{}, param string) error { - max, _ := strconv.Atoi(param) - st := reflect.ValueOf(v) - keys := st.MapKeys() - for _, key := range keys { - v := st.MapIndex(key) - ttype := v.Interface().(*Contact).Type - value := v.Interface().(*Contact).Value - if ttype == "" { - return errors.New("type must be set") - } - if ttype == ContactTypePhone { - if len(value) > max { - return fmt.Errorf("phone cannot be longer then %d characters", max) - } - } - } - return nil -} - -// IsValid checks if address contents are valid based on validation specified -func (address *Address) Validate() error { - validator.SetValidationFunc("vpMax", validatePhoneMax) - return validator.Validate(address) -} From 63dcc0336b5cb52c3ebdf3fa19000e68623b2301 Mon Sep 17 00:00:00 2001 From: Cyrill Schumacher Date: Tue, 5 May 2020 08:41:45 +0000 Subject: [PATCH 4/4] chore: go mod update, remove outdated tests (#16) --- address/address_test.go | 120 -------------------------------- go.mod | 35 +++++----- go.sum | 147 ++++++++++++++++++++++++++++++++-------- unique/unique.go | 2 +- 4 files changed, 137 insertions(+), 167 deletions(-) delete mode 100644 address/address_test.go diff --git a/address/address_test.go b/address/address_test.go deleted file mode 100644 index d461a27..0000000 --- a/address/address_test.go +++ /dev/null @@ -1,120 +0,0 @@ -package address - -import ( - "math/rand" - "testing" - "time" -) - -type fields struct { - Id string - ExternalID string - Person *Person - Type AddressType - Street string - StreetNumber string - ZIP string - City string - Country string - CountryCode string - Company string -} - -func TestAddress_Validate(t *testing.T) { - - rand.Seed(time.Now().UnixNano()) - - tests := []struct { - name string - fields fields - wantErr bool - }{ - { - "valid address", - validAddressFields(), - false, - }, - { - "invalid person phone", - invalidPersonContactsPhoneGt250(), - true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - address := &Address{ - Id: tt.fields.Id, - ExternalID: tt.fields.ExternalID, - Person: tt.fields.Person, - Type: tt.fields.Type, - Street: tt.fields.Street, - StreetNumber: tt.fields.StreetNumber, - ZIP: tt.fields.ZIP, - City: tt.fields.City, - Country: tt.fields.Country, - CountryCode: tt.fields.CountryCode, - Company: tt.fields.Company, - } - if err := address.Validate(); (err != nil) != tt.wantErr { - t.Errorf("Validate() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} - -var letters = []rune("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") - -func randSeq(n int) string { - b := make([]rune, n) - for i := range b { - b[i] = letters[rand.Intn(len(letters))] - } - return string(b) -} - -func invalidPersonContactsPhoneGt250() fields { - f := validAddressFields() - f.Person = validPerson() - f.Person.SetPhone(randSeq(255)) - return f -} - -func validAddressFields() fields { - return fields{ - Id: randSeq(10), - ExternalID: randSeq(10), - Person: &Person{ - FirstName: randSeq(10), - LastName: randSeq(10), - Salutation: SalutationTypeMr, - Contacts: map[string]*Contact{ - randSeq(10): { - Type: ContactTypePhone, - Value: randSeq(10), - }, - }, - }, - Type: AddressDefaultBilling, - Street: randSeq(10), - StreetNumber: randSeq(10), - ZIP: randSeq(4), - City: randSeq(10), - Country: randSeq(10), - CountryCode: randSeq(10), - Company: randSeq(10), - } -} - -func validPerson() *Person { - return &Person{ - FirstName: randSeq(10), - LastName: randSeq(10), - Salutation: SalutationTypeMr, - Contacts: map[string]*Contact{ - randSeq(10): { - Type: ContactTypePhone, - Value: randSeq(10), - }, - }, - } -} diff --git a/go.mod b/go.mod index f6d2a00..4fbd1e5 100644 --- a/go.mod +++ b/go.mod @@ -3,24 +3,21 @@ module github.com/foomo/shop go 1.13 require ( - github.com/beorn7/perks v1.0.0 // indirect - github.com/bwmarrin/snowflake v0.0.0-20160812182805-3107b1dd8c52 + github.com/bwmarrin/snowflake v0.3.0 github.com/davecgh/go-spew v1.1.1 - github.com/golang/protobuf v0.0.0-20171021043952-1643683e1b54 // indirect - github.com/kr/pretty v0.1.0 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect - github.com/mitchellh/mapstructure v1.1.2 - github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663 - github.com/prometheus/client_golang v0.8.0 - github.com/prometheus/client_model v0.0.0-20150212101744-fa8ad6fec335 // indirect - github.com/prometheus/common v0.0.0-20161114134743-0d5de9d6d862 // indirect - github.com/prometheus/procfs v0.0.0-20160411190841-abf152e5f3e9 // indirect - github.com/sergi/go-diff v1.0.0 - github.com/stretchr/testify v1.4.0 - github.com/ventu-io/go-shortid v0.0.0-20160104014424-6c56cef5189c - golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a - golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect - gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce - gopkg.in/validator.v2 v2.0.0-20191107172027-c3144fdedc21 + github.com/golang/protobuf v1.4.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/mitchellh/mapstructure v1.3.0 + github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/prometheus/client_golang v1.6.0 + github.com/sergi/go-diff v1.1.0 + github.com/stretchr/testify v1.5.1 + github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf // indirect + github.com/ventu-io/go-shortid v0.0.0-20171029131806-771a37caa5cf + golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79 + golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 // indirect + gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect + gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 + gopkg.in/yaml.v2 v2.2.8 // indirect ) diff --git a/go.sum b/go.sum index 2368b20..bd1c312 100644 --- a/go.sum +++ b/go.sum @@ -1,51 +1,144 @@ +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/bwmarrin/snowflake v0.0.0-20160812182805-3107b1dd8c52 h1:HerbFD8ENtfzNCfER7clxuXxTw1END8T/t9DeJ7dpCo= -github.com/bwmarrin/snowflake v0.0.0-20160812182805-3107b1dd8c52/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0= +github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/golang/protobuf v0.0.0-20171021043952-1643683e1b54 h1:nRNJXiJvemchkOTn0V4U11TZkvacB94gTzbTZbSA7Rw= -github.com/golang/protobuf v0.0.0-20171021043952-1643683e1b54/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1 h1:ZFgWrT+bLgsYPirOnRfKLYJLvssAegOj/hgyMFdJZe0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663 h1:Ri1EhipkbhWsffPJ3IPlrb4SkTOPa2PfRXp3jchBczw= -github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= +github.com/mitchellh/mapstructure v1.3.0 h1:iDwIio/3gk2QtLLEsqU5lInaMzos0hDTz8a6lazSFVw= +github.com/mitchellh/mapstructure v1.3.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E= +github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.8.0 h1:1921Yw9Gc3iSc4VQh3PIoOqgPCZS7G/4xQNVUp8Mda8= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_model v0.0.0-20150212101744-fa8ad6fec335 h1:0E/5GnGmzoDCtmzTycjGDWW33H0UBmAhR0h+FC8hWLs= -github.com/prometheus/client_model v0.0.0-20150212101744-fa8ad6fec335/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.0.0-20161114134743-0d5de9d6d862 h1:lwIy6DlN999vSMirNfNhYedUgEMQ+4BYXZybzaqvmZk= -github.com/prometheus/common v0.0.0-20161114134743-0d5de9d6d862/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/procfs v0.0.0-20160411190841-abf152e5f3e9 h1:ex32PG6WhE5zviWS08vcXTwX2IkaH9zpeYZZvrmj3/U= -github.com/prometheus/procfs v0.0.0-20160411190841-abf152e5f3e9/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.6.0 h1:YVPodQOcK15POxhgARIvnDRVpLcuK8mglnMrWfyrw6A= +github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.11 h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia5qI= +github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/ventu-io/go-shortid v0.0.0-20160104014424-6c56cef5189c h1:5v/4YnGPv0eHaqzlkPwEN+Ch0BV1RcnIHjy19xKqSYA= -github.com/ventu-io/go-shortid v0.0.0-20160104014424-6c56cef5189c/go.mod h1:6rZqAOk/eYX5FJyjQJ6Z3RBSN389IXX2ijwW4FcggaM= -golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a h1:Igim7XhdOpBnWPuYJ70XcNpq8q3BCACtVgNfoJxOV7g= -golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf h1:Z2X3Os7oRzpdJ75iPqWZc0HeJWFYNCvKsfpQwFpRNTA= +github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0= +github.com/ventu-io/go-shortid v0.0.0-20171029131806-771a37caa5cf h1:cgAKVljim9RJRcJNGjnBUajXj1FupBSdWwW4JaQG7vk= +github.com/ventu-io/go-shortid v0.0.0-20171029131806-771a37caa5cf/go.mod h1:6rZqAOk/eYX5FJyjQJ6Z3RBSN389IXX2ijwW4FcggaM= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79 h1:IaQbIIB2X/Mp/DKctl6ROxz1KyMlKp4uyvL6+kQ7C88= +golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f h1:gWF768j/LaZugp8dyS4UwsslYCYz9XgFxvlgsn0n9H8= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 h1:5B6i6EAiSYyejWfvc5Rc9BbI3rzIsrrXfAQBWnYfn+w= +golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0 h1:cJv5/xdbk1NnMPR1VP9+HU6gupuG9MLBoH1r6RHZ2MY= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce h1:xcEWjVhvbDy+nHP67nPDDpbYrY+ILlfndk4bRioVHaU= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/validator.v2 v2.0.0-20191107172027-c3144fdedc21 h1:2QQcyaEBdpfjjYkF0MXc69jZbHb4IOYuXz2UwsmVM8k= -gopkg.in/validator.v2 v2.0.0-20191107172027-c3144fdedc21/go.mod h1:o4V0GXN9/CAmCsvJ0oXYZvrZOe7syiDZSN1GWGZTGzc= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw= +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/unique/unique.go b/unique/unique.go index 4d1d8ed..643c2d7 100644 --- a/unique/unique.go +++ b/unique/unique.go @@ -38,7 +38,7 @@ func GetNewIDSnowFlake() string { func GetNewIDShortID() string { var seed uint64 = 3214 if generator == nil { - newGenerator, err := shortid.New(1, shortid.DEFAULT_ABC, seed) + newGenerator, err := shortid.New(1, shortid.DefaultABC, seed) generator = newGenerator if err != nil { // The Shop can no longer work without this, therfore panic.