urlcanon

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Canonicalize

func Canonicalize(raw string, opts Options) string

Canonicalize normalizes URLs for deterministic comparison.

Shared behavior: - trims surrounding whitespace - lowercases scheme and host - removes default ports - strips fragments - strips volatile auth/session query parameters - sorts remaining query keys and values deterministically

func IsVolatileQueryKey

func IsVolatileQueryKey(raw string) bool

IsVolatileQueryKey reports whether the query parameter key usually carries auth/session expiry noise rather than stable stream identity.

Types

type Options

type Options struct {
	RequireAbsolute        bool
	StripUserInfo          bool
	FallbackToLowercaseRaw bool
}

Options controls canonical URL normalization behavior for identity and uniqueness comparisons across playlist ingest, source configuration, and dynamic channel matching.

Jump to

Keyboard shortcuts

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