extractor

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 1 Imported by: ? 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

This section is empty.

Functions

This section is empty.

Types

type RegexUrlExtractor

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

RegexUrlExtractor is a concrete implementation of the RegexUrlExtractor interface, using regex for extraction.

func NewRegexUrlExtractor

func NewRegexUrlExtractor(query string) (*RegexUrlExtractor, error)

NewRegexUrlExtractor creates a new regular expression to extract urls

func (*RegexUrlExtractor) Extract

func (re *RegexUrlExtractor) Extract(text string) []string

Extract implements the UrlExtractor interface, using the regex to find urls in the given text.

type UrlExtractor

type UrlExtractor interface {
	Extract(text string) []string
}

UrlExtractor is an interface that defines the contract for url extraction.

Jump to

Keyboard shortcuts

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