Help us shape the future of Go! Take the 2026 Go Developer Survey

extractor

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainExtractor

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

DomainExtractor is an interface that defines the contract for domain extraction.

type RegexDomainExtractor

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

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

func NewRegexDomainExtractor

func NewRegexDomainExtractor() (*RegexDomainExtractor, error)

NewRegexDomainExtractor creates a new regular expression to extract domains

func (*RegexDomainExtractor) Extract

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

Extract implements the DomainExtractor interface, using the regex to find domains in the given text.

Jump to

Keyboard shortcuts

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