Get rid of checks when creating constructs. Check should handle this.

This commit is contained in:
2024-10-19 14:12:51 +02:00
parent 960889f9e7
commit 57db4178d0
21 changed files with 143 additions and 345 deletions

10
logo.go
View File

@@ -11,13 +11,9 @@ type Logo struct {
URI string `xml:",chardata"` // IRI
}
// NewLogo creates a new Logo. It returns a *Logo and an error.
func NewLogo(uri string) (*Logo, error) {
if !isValidIRI(uri) {
return nil, fmt.Errorf("uri %v not correctly formatted", uri)
}
return &Logo{URI: uri}, nil
// NewLogo creates a new Logo. It returns a *Logo.
func NewLogo(uri string) *Logo {
return &Logo{URI: uri}
}
// Check checks the Logo for incompatibilities with RFC4287. It returns an