netutil

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRootDomain

func GetRootDomain(u *url.URL) string

GetRootDomain extracts the effective top-level domain plus one (eTLD+1) from a URL. If extraction fails (e.g. for IP addresses or localhost), it falls back to the hostname.

func NormalizeURL added in v0.0.5

func NormalizeURL(rawURL string) string

NormalizeURL removes fragments, common tracking/marketing parameters, and trailing slashes from a URL.

Types

This section is empty.

Jump to

Keyboard shortcuts

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