network

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package network provides pure IP, CIDR, URL, and hostname normalization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InCIDR

func InCIDR(ip, cidr string) (bool, error)

InCIDR reports whether ip belongs to the supplied CIDR network.

func NormalizeHostname

func NormalizeHostname(value string) (string, error)

NormalizeHostname lowercases and converts a hostname to ASCII lookup form.

func NormalizeIP

func NormalizeIP(value string) (string, error)

NormalizeIP parses an IP address and returns its canonical textual form.

func NormalizeURL

func NormalizeURL(value string) (string, error)

NormalizeURL canonicalizes an absolute URL, including host and default ports.

func Options

func Options() []exprlib.Option

Options returns the Expr registrations for network helpers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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