Cast to budgeteer.ID
This commit is contained in:
parent
97ca85a0db
commit
6a8818dab6
@ -4,6 +4,7 @@ import (
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"git.javil.eu/jacob1123/budgeteer"
|
||||
"github.com/oklog/ulid"
|
||||
)
|
||||
|
||||
@ -21,6 +22,7 @@ func NewGenerator() (*UlidGenerator, error) {
|
||||
return ug, nil
|
||||
}
|
||||
|
||||
func (ug *UlidGenerator) New() ulid.ULID {
|
||||
return ulid.MustNew(ulid.Timestamp(ug.time), ug.entropy)
|
||||
func (ug *UlidGenerator) New() budgeteer.ID {
|
||||
id := ulid.MustNew(ulid.Timestamp(time.Now()), ug.entropy)
|
||||
return budgeteer.ID(id)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user