Instanciate common attributes everywhere so one can simply use the extend method
This commit is contained in:
@@ -15,7 +15,10 @@ type Person struct {
|
||||
|
||||
// NewPerson creates a new Person. It returns a *Person.
|
||||
func NewPerson(name string) *Person {
|
||||
return &Person{Name: name}
|
||||
return &Person{
|
||||
CommonAttributes: newCommonAttributes(),
|
||||
Name: name,
|
||||
}
|
||||
}
|
||||
|
||||
// AddExtension adds the Extension to the Person.
|
||||
|
Reference in New Issue
Block a user