Change URI to IRI after finding validation pattern
This commit is contained in:
4
link.go
4
link.go
@@ -9,7 +9,7 @@ type Link struct {
|
||||
*CommonAttributes
|
||||
Title Text `xml:"title,attr,omitempty"`
|
||||
Content Content `xml:"content"` // undefinedContent in RFC4287
|
||||
Href URI `xml:"href,attr"`
|
||||
Href IRI `xml:"href,attr"`
|
||||
Rel string `xml:"rel,attr,omitempty"`
|
||||
Type MediaType `xml:"type,attr,omitempty"`
|
||||
HrefLang LanguageTag `xml:"hreflang,attr,omitempty"`
|
||||
@@ -22,7 +22,7 @@ func NewLink(href string) (*Link, error) {
|
||||
return nil, fmt.Errorf("error creating content element: %v", err)
|
||||
}
|
||||
|
||||
return &Link{Href: URI(href), Content: content}, nil
|
||||
return &Link{Href: IRI(href), Content: content}, nil
|
||||
}
|
||||
|
||||
func (l *Link) Check() error {
|
||||
|
Reference in New Issue
Block a user