domainfilter

package
v0.0.0-...-3a08753 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropCommentsFilter

func DropCommentsFilter(in string) []string

DropCommentsFilter removes all comments and drops lines that are entirely comments

func DropIPAddressesFilter

func DropIPAddressesFilter(in string) []string

DropIPAddressesFilter drops all IP addresses

func ExactPrefixFilter

func ExactPrefixFilter(prefix string) func(in string) []string

ExactPrefixFilter prepends exact matches with the given prefix

func ExtractNoSpaceGroupsFilter

func ExtractNoSpaceGroupsFilter(in string) []string

ExtractNoSpaceGroupsFilter extracts all char sequences that don't contain a space

func Filter

func Filter(filters []FilterFn, input []string) (output []string, err error)

Filter applies a list of filters to a string slice

func HasValidTLDFilter

func HasValidTLDFilter(in string) []string

HasValidTLDFilter drops all invalid domains

func LeadingDotToWildcard

func LeadingDotToWildcard(in string) []string

LeadingDotToWildcard replaces all trailing whitespaces with a wildcard

func TrimWhiteSpaceFilter

func TrimWhiteSpaceFilter(in string) []string

TrimWhiteSpaceFilter trims leading and trailing whitespace

func Uniq

func Uniq(input []string) []string

Uniq returns a slice of unique entries

Types

type FilterFn

type FilterFn func(in string) (out []string)

FilterFn implements a filter function

Jump to

Keyboard shortcuts

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