labels

package
v0.19.1069 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package labels provides a shared parser for kubectl-style label arguments used by `nuon installs label`, `nuon components label`, and `nuon actions label`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseArgs

func ParseArgs(args []string) (set map[string]string, remove []string, err error)

ParseArgs parses kubectl-style label args into add and remove sets.

"key=value" -> set["key"] = "value"
"key-"      -> remove ["key"]

Returns an error on malformed args. Empty args returns empty maps and nil error (caller may interpret that as "no-op / list").

func ParseKeys added in v0.19.986

func ParseKeys(args []string) ([]string, error)

ParseKeys validates bare label keys (used by `unset`). It rejects empty keys and any "key=value" form, since a value has no meaning when removing a label.

"key"       -> "key"
"key=value" -> error

Types

This section is empty.

Jump to

Keyboard shortcuts

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