Help us shape the future of Go! Take the 2026 Go Developer Survey

selector

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidSelectorError

type InvalidSelectorError struct {
	Selector string
	Reason   string
}

InvalidSelectorError represents an error in selector format

func (*InvalidSelectorError) Error

func (e *InvalidSelectorError) Error() string

type Operator

type Operator int

Operator represents the comparison operator for selectors

const (
	// Eq represents the equality operator
	Eq Operator = iota
	// Ne represents the inequality operator
	Ne
)

func (Operator) String

func (o Operator) String() string

String returns the string representation of the Operator

type Selector

type Selector struct {
	Key      string
	Value    string
	Operator Operator
}

Selector represents a key-value selector with an operator

func FromString

func FromString(s string) (*Selector, error)

FromString creates a new Selector from a string representation

func (*Selector) String

func (s *Selector) String() string

String returns the string representation of the Selector

Jump to

Keyboard shortcuts

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