hostname

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: GPL-3.0, LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package hostname decides whether a name may be used as one label of a host name.

Adapted from GSI-HPC/clusterctl internal/hostname.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLabel

func CheckLabel(label string) error

CheckLabel reports whether label is a host name label as RFC 1123 spells it: ASCII letters, digits and hyphens, not empty, not longer than 63 characters, and not beginning or ending with a hyphen.

A name that passes has no character that a path, a DNS name, a Docker resource name or a command line gives a meaning to: no "/", "." or "..", no leading "-" that a command would read as an option.

Types

This section is empty.

Jump to

Keyboard shortcuts

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