Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Link ¶
Link represents a link (<a href="...">) in an HTML document.
func Parse ¶
Parse receives an HTML document and returns a slice of Links parsed from it.
Example ¶
s := `<a href="https://go.dev">Hello, Go!</a>` r := strings.NewReader(s) links, err := Parse(r) if err != nil { log.Fatal(err) } fmt.Printf("%+v", links)
Output: [{Href:https://go.dev Text:Hello, Go!}]
Click to show internal directories.
Click to hide internal directories.