Add Random Generator

This commit is contained in:
Dan Jones 2025-03-15 15:36:43 -05:00
commit 1677a692d1
8 changed files with 142 additions and 53 deletions

View file

@ -1,10 +1,6 @@
package nomino
import (
"errors"
"github.com/google/uuid"
)
import "errors"
// Generator is a function that returns the "random" portion of the returned filename.
// Technically, it doesn't necessarily need to be random, and could be based on time, or a counter,
@ -43,16 +39,3 @@ func MultiGeneratorInOrder(gens ...Generator) Generator {
return st, err
}
}
func uuidGen(*Config) (string, error) {
u, err := uuid.NewRandom()
if err != nil {
return "", err
}
return u.String(), nil
}
// UUID generates a UUIDv4.
func UUID() Generator {
return uuidGen
}