Add function to create a new extension element
This commit is contained in:
parent
9ec6ad1460
commit
ac78db9917
@ -10,6 +10,10 @@ type ExtensionElement struct {
|
||||
XMLName xml.Name
|
||||
}
|
||||
|
||||
func NewExtensionElement(name string, value any) *ExtensionElement {
|
||||
return &ExtensionElement{XMLName: xml.Name{Local: name}, Value: value}
|
||||
}
|
||||
|
||||
func (e *ExtensionElement) Check() error {
|
||||
if e.Value == nil {
|
||||
return errors.New("value element of extension element empty")
|
||||
|
Loading…
x
Reference in New Issue
Block a user