utils

package
v1.4.12 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultIfEmpty added in v1.4.0

func DefaultIfEmpty(m map[string]string, def map[string]string) map[string]string

func IsSubset added in v1.4.10

func IsSubset(a, b []string) bool

IsSubset checks if a set contains b subset

func LabelNames

func LabelNames(labels map[string]string) []string

LabelNames returns sorted label keys

func LabelValues

func LabelValues(labels map[string]string, labelNames []string) []string

func LabelsToLogFields

func LabelsToLogFields(labelsMaps ...map[string]string) log.Fields

func MergeLabels

func MergeLabels(labelsMaps ...map[string]string) map[string]string

MergeLabels merges several maps into one. Last map keys overrides keys from first maps.

Can be used to copy a map if just one argument is used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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