EighthTask

package
v0.0.0-...-f045e08 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Crawl

func Crawl(url string, depth int, fetcher Fetcher, fetchedUrls ...map[string]void)

Crawl uses fetcher to recursively crawl pages starting with url, to a maximum of depth. Implementing a function without changing the signature (almost)

func Main

func Main()

func Same

func Same(t1, t2 *tree.Tree) bool

Same determines whether the trees t1 and t2 contain the same values.

func Walk

func Walk(t *tree.Tree, ch chan int)

Walk walks the tree t sending all values from the tree to the channel ch.

Types

type FetchResult

type FetchResult struct {
	// contains filtered or unexported fields
}

type Fetcher

type Fetcher interface {
	// Fetch returns the body of URL and
	// a slice of URLs found on that page.
	Fetch(url string) (body string, urls []string, err error)
}

Jump to

Keyboard shortcuts

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