Added more error handling and necessary functions
This commit is contained in:
6
logo.go
6
logo.go
@@ -8,11 +8,11 @@ import (
|
||||
type Logo struct {
|
||||
XMLName xml.Name `xml:"logo"`
|
||||
*CommonAttributes
|
||||
URI IRI `xml:",chardata"`
|
||||
URI string `xml:",chardata"` // IRI
|
||||
}
|
||||
|
||||
// NewLogo creates a new Logo. It returns a *Logo.
|
||||
func NewLogo(uri IRI) (*Logo, error) {
|
||||
// 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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user