labelutil

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

Variables

This section is empty.

Functions

func NormalizeLabelValue

func NormalizeLabelValue(value string) string

NormalizeLabelValue normalizes and shortens the given label value to fit within MaxLabelLength.

func NormalizeNameValue

func NormalizeNameValue(value string) string

NormalizeNameValue normalizes and shortens the given name value to fit within MaxNameLength.

func NormalizeValue

func NormalizeValue(value string) string

NormalizeValue normalizes the given value by replacing unwanted characters with hyphens, converting to lowercase, and trimming leading/trailing hyphens.

func ShortenValue

func ShortenValue(value string, maxLen int, separator string) (bool, string)

ShortenValue shortens the given value to fit within maxLen by keeping the first and last parts and replacing the middle part with a hash if necessary. Returns true if the value was shortened, false otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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