validate

package module
v0.52.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Overview

Package validate provides hostname validation helpers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanHostnameDir

func CleanHostnameDir(hostname string) string

CleanHostnameDir returns a hostname normalized to be uses as a directory name.

func NormalizeHost

func NormalizeHost(host string) (string, error)

NormalizeHost applies a liberal policy on host names.

func ValidHostname

func ValidHostname(hostname string) error

ValidHostname determines whether the passed string is a valid hostname. In case it's not, the returned error contains the details of the failure.

Types

This section is empty.

Jump to

Keyboard shortcuts

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