waitgroup

package
v0.0.0-...-891ad17 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 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) Present

func (c *CrawlError) Present() bool

Present can be used to determine if we should return this

Jump to

Keyboard shortcuts

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