names

package
v0.0.0-...-3c97bdd Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabelName

func LabelName(name string) string

LabelName cleans up a string to be used as a RFC 1123 Label name. It does not enforce the 63 character limit.

RFC 1123 Label name:

  • contain only lowercase alphanumeric characters or '-'
  • start with an alphanumeric character
  • end with an alphanumeric character

Examples:

  • myproject, MYPROJECT -> myproject
  • myProject, myProjecT, MyProject, MyProjecT -> my-project
  • my.project, My.Project, my-project, My-Project -> my-project

func ValidateLabelName

func ValidateLabelName(name string) error

ValidateLabelName checks if the given name is a valid RFC 1123 Label name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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