validations

package
v0.0.0-...-bb536ff Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustBe

func MustBe[T any](validation func(v T) bool) func(v T) MustBeOr[T]

func NotEmptyMap

func NotEmptyMap[K comparable, V any](value map[K]V) bool

func NotEmptySlice

func NotEmptySlice[T any](value []T) bool

func NotEmptyString

func NotEmptyString(value string) bool

Types

type MustBeOr

type MustBeOr[T any] interface {
	OrPanic()
	OrPanicWithMessage(msg string)
	OrElse(other T) T
	OrElseGet(getter func() T) T
}

Jump to

Keyboard shortcuts

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