Get rid of checks when creating constructs. Check should handle this.
This commit is contained in:
10
icon.go
10
icon.go
@@ -12,13 +12,9 @@ type Icon struct {
|
||||
URI string `xml:",chardata"` // IRI
|
||||
}
|
||||
|
||||
// NewIcon creates a new Icon. It returns a *Icon and an error.
|
||||
func NewIcon(uri string) (*Icon, error) {
|
||||
if !isValidIRI(uri) {
|
||||
return nil, fmt.Errorf("uri %v not correctly formatted", uri)
|
||||
}
|
||||
|
||||
return &Icon{URI: uri}, nil
|
||||
// NewIcon creates a new Icon. It returns a *Icon.
|
||||
func NewIcon(uri string) *Icon {
|
||||
return &Icon{URI: uri}
|
||||
}
|
||||
|
||||
// Check checks the Icon for incompatibilities with RFC4287. It returns an
|
||||
|
Reference in New Issue
Block a user