Added and corrected comments

This commit is contained in:
2024-10-16 19:59:28 +02:00
parent 6a76bdc0c3
commit 4220a2acc6
23 changed files with 131 additions and 39 deletions

View File

@@ -12,10 +12,13 @@ type Logo struct {
URI IRI `xml:"uri"`
}
// NewLogo creates a new Logo. It returns a *Logo.
func NewLogo() *Logo {
return &Logo{URI: IRI(fmt.Sprint("urn:uuid:", uuid.New()))}
}
// Check checks the Logo for incompatibilities with RFC4287. It returns an
// error.
func (l *Logo) Check() error {
if l.URI == "" {
return errors.New("uri element of logo empty")