link

package
v0.0.0-...-4df7676 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToXML

func ToXML(links []Link)

ToXML marshal the give slices of links into XML

Types

type Link struct {
	Href url.URL
}

Link represents the content of a hypermedia link from a HTML file

func New

func New(rawurl string) (*Link, error)

New instanciates a new link

func Parse

func Parse(r io.Reader) ([]Link, error)

Parse links from given reader

func Unique

func Unique(links []Link) []Link

Unique returns a set of links without duplicate links

func (*Link) HasSameDomain

func (l *Link) HasSameDomain(u url.URL) bool

HasSameDomain checks if the link has the same domain as the given URL

func (l *Link) IsSameLink(target Link) bool

IsSameLink checks if the given link is the same URL

func (*Link) String

func (l *Link) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL