mirror of
https://github.com/lus/pasty.git
synced 2023-08-10 21:13:09 +03:00
Add option to define ID and modification token generation characters (#17)
This commit is contained in:
@ -8,7 +8,7 @@ import (
|
||||
// AcquireID generates a new unique ID
|
||||
func AcquireID() (string, error) {
|
||||
for {
|
||||
id := utils.RandomString(config.Current.IDLength)
|
||||
id := utils.RandomString(config.Current.IDCharacters, config.Current.IDLength)
|
||||
paste, err := Current.Get(id)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
Reference in New Issue
Block a user