package atomfeed import ( "errors" "fmt" "github.com/google/uuid" ) type Logo struct { *CommonAttributes URI IRI `xml:"uri"` } func NewLogo() *Logo { return &Logo{URI: IRI(fmt.Sprint("urn:uuid:", uuid.New()))} } func (l *Logo) Check() error { if l.URI == "" { return errors.New("uri element of logo empty") } else { if !isValidIRI(l.URI) { return fmt.Errorf("uri element %v of logo not correctly formatted", l.URI) } } return nil }