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