linkscanner: Index | Files

package linkscanner

import ""


Package Files

linkscanner.go version.go

func FixWWW Uses

func FixWWW(f bool)

FixWWW enables the override of the default setting in this package to fix wwww links where there isn't a protocol specified, e.g. http://

func GetVersion Uses

func GetVersion() string

GetVersion returns the version of the package to the calling code.

func HTTPScanner Uses

func HTTPScanner(content string) ([]string, []error)

HTTPScanner expects a length of text as input and returns two slices Dependant on what it discovers. First a unique list of URLs parsed successfully by net/url. Second a list of errors that were encountered trying to parse the URL found in the text.

func HTTPScannerIndex Uses

func HTTPScannerIndex(content string) ([]map[int]string, []error)

HTTPScannerIndex provides the same basic functionality of HTTPScanner. The number of words scanned is monitored. This count becomes an position integer providing an approximate index in the text where the hyper-link was found. The returned value is not a zero-based index.

func ListProtocols Uses

func ListProtocols() []string

ListProtocols returns to the caller a list of protocols that we're testing for when scanning text.

func LoadExtensions Uses

func LoadExtensions(extensions []string)

LoadExtensions enables linkscanner to look beyond the default protocols that are specified in the library.

Package linkscanner imports 4 packages (graph). Updated 2019-03-30. Refresh now. Tools for package owners.