waitgroup

package
v0.0.0-...-b631e0d Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Crawl

func Crawl(sites []string) ([]int, error)

Crawl collects responses from a list of urls that are passed in. It waits for all requests to complete before returning.

func GetURL

func GetURL(url string) (*http.Response, error)

GetURL gets a url, and logs the time it took

Types

type CrawlError

type CrawlError struct {
	Errors []string
}

CrawlError is our custom error type for aggregating errors

func (*CrawlError) Add

func (c *CrawlError) Add(err error)

Add adds another error

func (*CrawlError) Error

func (c *CrawlError) Error() string

Error implements the error interface

func (*CrawlError) Valid

func (c *CrawlError) Valid() bool

Valid can be used to determine if we should return this

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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