domain

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmptyHostname indicates the input does not contain a hostname
	ErrEmptyHostname = errors.New("hostname is required")
	// ErrInvalidHostname indicates the input could not be parsed into a hostname
	ErrInvalidHostname = errors.New("invalid hostname")
)

Functions

func NormalizeHostname

func NormalizeHostname(input string) (string, error)

NormalizeHostname extracts the hostname from a URL or raw host input, lowercases it, and removes trailing dots

Types

This section is empty.

Jump to

Keyboard shortcuts

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