domains

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package domains provides canonical domain normalization helpers shared across services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeDomain

func NormalizeDomain(raw string) (string, error)

NormalizeDomain canonicalizes a user-supplied domain for storage and hostId hashing.

Rules: - trims whitespace, strips trailing dot, lowercases - rejects schemes, paths, ports, credentials, and wildcards - converts IDNs to ASCII (UTS#46) via idna.Lookup - requires at least one dot (public suffix-like shape)

Types

This section is empty.

Jump to

Keyboard shortcuts

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