This commit is contained in:
Jason Streifling 2024-10-19 12:37:44 +02:00
parent f4dfd6d060
commit 960889f9e7

View File

@ -29,7 +29,7 @@ func NewLink(href string) (*Link, error) {
// SetType sets the Type attribute of the Link. It returns an error.
func (l *Link) SetType(t string) error {
if !isValidMediaType(t) {
return fmt.Errorf("type %v invalid media type", l)
return fmt.Errorf("type %v invalid media type", t)
}
return nil
@ -38,7 +38,7 @@ func (l *Link) SetType(t string) error {
// SetHrefLang sets the HrefLang attribute of the Link. It returns an error.
func (l *Link) SetHrefLang(h string) error {
if !isValidLanguageTag(h) {
return fmt.Errorf("hreflang %v invalid language tag", l)
return fmt.Errorf("hreflang %v invalid language tag", h)
}
return nil