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

comparator

package
v1.102.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package comparator provides value comparison utilities for prompts.

Index

Constants

View Source
const (
	LessThanEq = "Less Than Or Eq"
	MoreThanEq = "More Than Or Eq"
	MoreThan   = "More Than"
	NotEq      = "Not Equal"
)

Comparison type constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Comparator

type Comparator struct {
	Label string // Label that identifies reference value
	Type  string // Less Than Eq, More Than Eq, or More Than
	Value uint64 // Value to Compare To
}

Comparator struct for value comparisons

func (*Comparator) Validate

func (c *Comparator) Validate(val uint64) error

Validate checks if the given value satisfies the comparator constraint

Jump to

Keyboard shortcuts

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