urlutil

package
v0.0.0-...-4f6a71e Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package urlutil provides helpers for working with URLs and hostnames.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalid = errors.New("urlutil: invalid")

ErrInvalid wraps every reason Registrable rejects an input — bad URL syntax, missing host, or a host the public suffix list can't reduce to a registrable domain (raw IPs, single-label hostnames like "localhost").

Functions

func Registrable

func Registrable(rawURL string) (string, error)

Registrable reduces rawURL to its registrable domain (eTLD+1).

Schemeless inputs such as "abc.google.com/test/v1" are accepted; an "https://" scheme is assumed when none is present.

Types

This section is empty.

Jump to

Keyboard shortcuts

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