2024-10-16 21:28:04 +02:00
|
|
|
package atom
|
2024-10-13 17:19:40 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/xml"
|
|
|
|
"errors"
|
|
|
|
)
|
|
|
|
|
2024-10-17 20:10:18 +02:00
|
|
|
// TODO: Is this really correct?
|
2024-10-13 17:19:40 +02:00
|
|
|
type ExtensionAttribute struct {
|
|
|
|
Value any `xml:",attr"`
|
|
|
|
XMLName xml.Name
|
|
|
|
}
|
|
|
|
|
2024-10-16 19:59:28 +02:00
|
|
|
// Check checks the ExtensionAttribute for incompatibilities with RFC4287. It
|
|
|
|
// returns an error.
|
2024-10-13 17:19:40 +02:00
|
|
|
func (e *ExtensionAttribute) Check() error {
|
|
|
|
if e.Value == nil {
|
|
|
|
return errors.New("value element of extension attribute empty")
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|