labels

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package labels canonicalizes case-insensitive label lists, such as CI runner labels, so services compare, deduplicate, and match them with one set of semantics.

The canonical form of a label trims surrounding whitespace and lowercases the remainder. The canonical form of a list applies that to every label, drops labels that become empty, and keeps only the first occurrence of each label while preserving order.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Canonical

func Canonical(label string) string

Canonical returns the canonical form of a single label.

func Canonicalize

func Canonicalize(list []string) []string

Canonicalize returns the canonical form of a label list.

func ContainsAll

func ContainsAll(list []string, required ...string) bool

ContainsAll reports whether list carries every required label, comparing both sides canonically. Required labels whose canonical form is empty are ignored, so ContainsAll with no effective requirements is always true.

func Set

func Set(list []string) map[string]struct{}

Set returns the canonical membership set of a label list, dropping labels whose canonical form is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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