func identifyLinkInfo(attributes []html.Attribute, url string) (link, error) {
	for _, attr := range attributes {
		if attr.Key == "href" {
			isAccessible, isExternal, err := extractLinkInfo(attr.Val, url)
			if err != nil {
				return link{}, err
			}

			l := link{}
			l.href = attr.Val
			l.isAccessible = isAccessible
			l.isExternal = isExternal

			return l, nil
		}
	}

	return link{}, errors.New("no href attribute available in given list")
}
// identifyLinkInfo identifies the properties of a href attribute of a anchor element.
// If the provided list of attributes does not contain a href value, then an error is returned.
identifyLinkInfo identifies the properties of a href attribute of a anchor element.
If the provided list of attributes does not contain a href value, then an error is returned.
// identifyLinkInfo identifies the properties of a href attribute of a anchor element . // If the provided list of attributes does not contain a href value then an error is returned .
func identifyLinkInfo(attributes []html.Attribute, url string) (link, error) {
	for _, attr := range attributes {
		if attr.Key == "href" {
			isAccessible, isExternal, err := extractLinkInfo(attr.Val, url)
			if err != nil {
				return link{}, err
			}
			l := link{}
			l.href = attr.Val
			l.isAccessible = isAccessible
			l.isExternal = isExternal
			return l, nil
		}
	}
	return link{}, errors.New("no href attribute available in given list")
}
func identifyLinkInfo ( attributes [ ] html . Attribute , url string ) ( link , error ) { for _ , attr := range attributes { if attr . Key == " " { isAccessible , isExternal , err := extractLinkInfo ( attr . Val , url ) if err != nil { return link { } , err } l := link { } l . href = attr . Val l . isAccessible = isAccessible l . isExternal = isExternal return l , nil } } return link { } , errors . New ( " " ) }
identifyLinkInfo identifies the properties of a href attribute of a anchor element.
identifyLinkInfo identifies the properties of a href attribute of a anchor element .