Instanciate common attributes everywhere so one can simply use the extend method

This commit is contained in:
2024-10-19 14:52:19 +02:00
parent a7a6b5c711
commit 7f30fd5411
18 changed files with 72 additions and 23 deletions

View File

@@ -59,9 +59,10 @@ func (e *Entry) checkAuthors(authorInFeed bool) error {
// NewEntry creates a new Entry. It returns a *Entry.
func NewEntry(title string) *Entry {
return &Entry{
ID: NewID(NewURN()),
Title: NewText("text", title),
Updated: NewDate(time.Now()),
CommonAttributes: newCommonAttributes(),
ID: NewID(NewURN()),
Title: NewText("text", title),
Updated: NewDate(time.Now()),
}
}