check

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package check implements common checks that can be used for flag and positional parameter values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtLeast

func AtLeast[T cmp.Ordered](min T) value.CheckFunc[T]

AtLeast checks that a value is greater than or equal to a given minimum.

func AtMost

func AtMost[T cmp.Ordered](max T) value.CheckFunc[T]

AtMost checks that a value is less than or equal to a given maximum.

func GreaterThan

func GreaterThan[T cmp.Ordered](min T) value.CheckFunc[T]

GreaterThan checks that a value is greater than a given minimum.

func LessThan

func LessThan[T cmp.Ordered](max T) value.CheckFunc[T]

LessThan checks that a value is less than a given maximum.

func NotBlank

func NotBlank(value string) error

NotBlank checks that a string contains at least one non-white-space character.

func OneOf

func OneOf[T comparable](options ...T) value.CheckFunc[T]

OneOf checks that a value is present in a given list of allowed options.

Types

This section is empty.

Jump to

Keyboard shortcuts

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