22 lines
382 B
Go
22 lines
382 B
Go
package atom
|
|
|
|
import (
|
|
"encoding/xml"
|
|
"errors"
|
|
)
|
|
|
|
type ExtensionAttribute struct {
|
|
Value any `xml:",attr"`
|
|
XMLName xml.Name
|
|
}
|
|
|
|
// Check checks the ExtensionAttribute for incompatibilities with RFC4287. It
|
|
// returns an error.
|
|
func (e *ExtensionAttribute) Check() error {
|
|
if e.Value == nil {
|
|
return errors.New("value element of extension attribute empty")
|
|
}
|
|
|
|
return nil
|
|
}
|