urlook

package
v0.0.0-...-6188d4b Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultHTTPRequestTimeout = 10

DefaultHTTPRequestTimeout is the max interval for http request in seconds

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

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

Bot is a main app object

func New

func New(urls []string) *Bot

New returns new Bot object

func (*Bot) CheckAllURLs

func (b *Bot) CheckAllURLs() error

CheckAllURLs checks all given URLs

func (*Bot) SetIsFailOnDuplicates

func (b *Bot) SetIsFailOnDuplicates(isFail bool)

SetIsFailOnDuplicates defines if duplicate urls will be ignored

func (*Bot) SetTimeout

func (b *Bot) SetTimeout(newTimeout int) error

SetTimeout sets the new http request timeout value

func (*Bot) SetWhiteList

func (b *Bot) SetWhiteList(wl []string)

SetWhiteList sets the white list urls

func (*Bot) SetWorkersCount

func (b *Bot) SetWorkersCount(newWorkersCount int)

SetWorkersCount sets the new workers count value

type Result

type Result struct {
	URL     string
	Message string
	Status  *status.Status // unknown status (0) by default
}

Result contains an URL check info

func (*Result) String

func (r *Result) String() string

String returns string representation of the Result

type URLChanItem

type URLChanItem struct {
	URL   string
	Index int
}

URLChanItem contains an url and it's index in results array

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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