utils

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateImageVector

func CreateImageVector() (imagevector.ImageVector, error)

CreateImageVector creates an image vector from the default images.yaml file or the images-wrapper.yaml file.

func MustBeGreaterThan

func MustBeGreaterThan[E constraints.Ordered](key string, lowerBound, value E) error

MustBeGreaterThan checks if the value is greater than the lowerBound. If it is not then an error is returned else nil is returned. Type is constrained by constraints.Ordered which enforces the consumers to use concrete types that can be compared using >, >=, <, <= operators.

func MustBeGreaterThanOrEqualTo

func MustBeGreaterThanOrEqualTo[E constraints.Ordered](key string, lowerBound, value E) error

MustBeGreaterThanOrEqualTo checks if the value is greater than or equal to the lowerBound. If it is not then an error is returned else nil is returned. Type is constrained by constraints.Ordered which enforces the consumers to use concrete types that can be compared using >, >=, <, <= operators.

func ShouldBeOneOfAllowedValues

func ShouldBeOneOfAllowedValues[E comparable](key string, allowedValues []E, value E) error

ShouldBeOneOfAllowedValues checks if value is amongst the allowedValues. If it is not then an error is returned else nil is returned. Type is constrained by comparable forcing the consumers to only use concrete types that can be compared using the == or != operators.

Types

This section is empty.

Jump to

Keyboard shortcuts

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