website

package
v0.0.0-...-ec614b1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analyze

func Analyze(url *url.URL, r io.Reader) (*models.Report, error)

Analyze performs full analysis od the provided website's URL. It tokenize HTML and iterates through it in order to find all necessary components.

func Fetch

func Fetch(u string) (io.ReadCloser, error)

Fetch performs a GET request on provided string with timeout of 5 seconds. If response's status code is in the range from 200 to 300 it returns it's Body. It's up to the user to close it once finished using it.

func Reachable

func Reachable(u string) (bool, int)

Reachable performs HEAD request on provided URL and checks the status code. If it's 200 it'll return `true` and status code. In any other case it'll return `false` adn status code 0.

Types

This section is empty.

Jump to

Keyboard shortcuts

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