Bug fix
This commit is contained in:
parent
f4dfd6d060
commit
960889f9e7
4
link.go
4
link.go
@ -29,7 +29,7 @@ func NewLink(href string) (*Link, error) {
|
|||||||
// SetType sets the Type attribute of the Link. It returns an error.
|
// SetType sets the Type attribute of the Link. It returns an error.
|
||||||
func (l *Link) SetType(t string) error {
|
func (l *Link) SetType(t string) error {
|
||||||
if !isValidMediaType(t) {
|
if !isValidMediaType(t) {
|
||||||
return fmt.Errorf("type %v invalid media type", l)
|
return fmt.Errorf("type %v invalid media type", t)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
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.
|
// SetHrefLang sets the HrefLang attribute of the Link. It returns an error.
|
||||||
func (l *Link) SetHrefLang(h string) error {
|
func (l *Link) SetHrefLang(h string) error {
|
||||||
if !isValidLanguageTag(h) {
|
if !isValidLanguageTag(h) {
|
||||||
return fmt.Errorf("hreflang %v invalid language tag", l)
|
return fmt.Errorf("hreflang %v invalid language tag", h)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user