Documentation
¶
Overview ¶
Exercise5.1 prints the links in an HTML document read from standard input.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Visit ¶
Visit appends to links each link found in n and returns the result.
Example ¶
document := `<html> <head></head> <body> <a href="link1">a</a> <a href="link2">b</a> </body> </html>` parseTree, _ := html.Parse(strings.NewReader(document)) for _, link := range Visit(nil, parseTree) { fmt.Println(link) }
Output: link1 link2
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.