Instanciate common attributes everywhere so one can simply use the extend method
This commit is contained in:
@@ -15,7 +15,11 @@ func (p *PlainText) isText() bool { return true }
|
||||
|
||||
// newPlainText creates a new PlainText. It returns a *PlainText.
|
||||
func newPlainText(textType, content string) *PlainText {
|
||||
return &PlainText{Type: textType, Text: content}
|
||||
return &PlainText{
|
||||
CommonAttributes: newCommonAttributes(),
|
||||
Type: textType,
|
||||
Text: content,
|
||||
}
|
||||
}
|
||||
|
||||
// Check checks the PlainText for incompatibilities with RFC4287. It returns an
|
||||
|
Reference in New Issue
Block a user