utils

package
v0.0.0-...-aa53c72 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const LinkTagAttrHref string = "href"
View Source
const LinkTagName string = "a"

Variables

This section is empty.

Functions

func AddSlashToPathIfNeeded

func AddSlashToPathIfNeeded(path string) string

func CloseIoReader

func CloseIoReader(body io.ReadCloser)

func ExtractLinkFromToken

func ExtractLinkFromToken(token html.Token) (string, bool)

func GetUrlRoot

func GetUrlRoot(websiteUrl string) (string, error)

GetUrlRoot returns scheme://host:port if possible

func GetWebPage

func GetWebPage(url string) (io.ReadCloser, error)

func IsAnchorTag

func IsAnchorTag(tokenType html.TokenType, token html.Token) bool

func IsValidUrl

func IsValidUrl(websiteUrl string) bool

func SumIntArr

func SumIntArr(array []int64) int64

Types

This section is empty.

Jump to

Keyboard shortcuts

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