Instanciate common attributes everywhere so one can simply use the extend method
This commit is contained in:
@@ -15,7 +15,10 @@ type Category struct {
|
||||
|
||||
// NewCategory creates a new Category. It returns a *Category.
|
||||
func NewCategory(term string) *Category {
|
||||
return &Category{Term: term}
|
||||
return &Category{
|
||||
CommonAttributes: newCommonAttributes(),
|
||||
Term: term,
|
||||
}
|
||||
}
|
||||
|
||||
// SetLabel sets the Label attribute of the Category.
|
||||
|
Reference in New Issue
Block a user