utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2020 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FilenamePtr   *string
	VerbosePtr    *bool
	JSONPtr       *bool
	IgnoreFilePtr *bool
)

flag globals

Functions

func GetIgnorePatterns

func GetIgnorePatterns(ignoreFilePath string, urlRegex *regexp.Regexp, ipRegex *regexp.Regexp) []string

GetIgnorePatterns creates a slice of URLs to ignore from the file string passed

func IgnoreURL

func IgnoreURL(urls []string, ignoreList []string) []string

IgnoreURL goes through the url list and removes any url that matches with the ignore url list

func RemoveDuplicate

func RemoveDuplicate(urls []string) []string

RemoveDuplicate removes duplicate strings from a slice of strings

Types

type RequestResult

type RequestResult struct {
	URL    string `json:"url"`
	Status int    `json:"status"`
}

RequestResult is a struct for storing urls and status codes

func CheckLink(wg *sync.WaitGroup, url string) (RequestResult, int, error)

CheckLink makes a request to a URL passed and returns it's status

Jump to

Keyboard shortcuts

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