Instanciate common attributes everywhere so one can simply use the extend method
This commit is contained in:
7
entry.go
7
entry.go
@@ -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()),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user