label

package
v0.0.0-...-5d11de0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromMap

func FromMap(in map[string][]string) []*labelv1.Label

FromMap converts a map[string][]string to a slice of *labelv1.Label. Each key-value pair in the input map is transformed into a label with the key as the name and the corresponding slice of strings as values.

func ToMap

func ToMap(labels []*labelv1.Label) map[string][]string

ToMap converts a slice of *labelv1.Label to a map[string][]string. Each label in the input slice contributes to the resulting map by adding its name as the key and appending its values to the corresponding slice of strings in the map. If there are multiple labels with the same key, their values will be concatenated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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