Small bug fix

This commit is contained in:
Jason Streifling 2024-10-17 16:56:46 +02:00
parent b496ac3691
commit 657624cbd6
3 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ func NewEntry(title string) (*Entry, error) {
} }
return &Entry{ return &Entry{
ID: NewID(), ID: NewID(NewURN()),
Title: text, Title: text,
Updated: NewDate(time.Now()), Updated: NewDate(time.Now()),
}, nil }, nil

View File

@ -34,7 +34,7 @@ func NewFeed(title string) (*Feed, error) {
} }
return &Feed{ return &Feed{
ID: NewID(), ID: NewID(NewURN()),
Title: text, Title: text,
Updated: NewDate(time.Now()), Updated: NewDate(time.Now()),
}, nil }, nil

2
id.go
View File

@ -11,7 +11,7 @@ type ID struct {
} }
// NewID creates a new ID. It returns a *ID. // NewID creates a new ID. It returns a *ID.
func NewID(id string) *ID { func NewID(id IRI) *ID {
return &ID{URI: IRI(id)} return &ID{URI: IRI(id)}
} }