Use string instead of ID type

This commit is contained in:
2016-12-20 16:52:26 +01:00
parent 83c36f00bf
commit 7c197ff49d
5 changed files with 7 additions and 8 deletions

View File

@@ -4,7 +4,6 @@ import (
"math/rand"
"time"
"git.javil.eu/jacob1123/budgeteer"
"github.com/oklog/ulid"
)
@@ -22,7 +21,7 @@ func NewGenerator() (*UlidGenerator, error) {
return ug, nil
}
func (ug *UlidGenerator) New() budgeteer.ID {
func (ug *UlidGenerator) New() string {
id := ulid.MustNew(ulid.Timestamp(time.Now()), ug.entropy)
return budgeteer.ID(id)
return id.String()
}