From 960889f9e73a2a2ef83b8972923cefc3bc478cf6 Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Sat, 19 Oct 2024 12:37:44 +0200 Subject: [PATCH] Bug fix --- link.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/link.go b/link.go index 0688d69..cd3a58d 100644 --- a/link.go +++ b/link.go @@ -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