domain

package
v0.0.0-...-365054f Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeHostname

func NormalizeHostname(hostname string) string

NormalizeHostname casts FQDN to canonical representation: no whitespace, no trailing dot, lower case.

Types

type Whitelist

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

Whitelist is a set of domain names and suffixes for fast matching

func NewWhitelist

func NewWhitelist(domainList []string) *Whitelist

NewWhitelist creates Whitelist from list of domains and suffixes

func (*Whitelist) Match

func (l *Whitelist) Match(hostname string) bool

Match returns whether hostname is present in whitelist

Jump to

Keyboard shortcuts

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