feat: remove v1
This commit is contained in:
@@ -17,7 +17,7 @@ func Provide(opts ...opt.Option) error {
|
||||
data := hashids.NewData()
|
||||
data.MinLength = int(config.MinLength)
|
||||
if data.MinLength == 0 {
|
||||
data.MinLength = 5
|
||||
data.MinLength = 10
|
||||
}
|
||||
|
||||
data.Salt = config.Salt
|
||||
@@ -25,8 +25,9 @@ func Provide(opts ...opt.Option) error {
|
||||
data.Salt = "default-salt-key"
|
||||
}
|
||||
|
||||
if config.Alphabet != "" {
|
||||
data.Alphabet = config.Alphabet
|
||||
data.Alphabet = config.Alphabet
|
||||
if config.Alphabet == "" {
|
||||
data.Alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
||||
}
|
||||
|
||||
return hashids.NewWithData(data)
|
||||
|
||||
Reference in New Issue
Block a user