comparer

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 0 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyEqualComparer

type AnyEqualComparer[T comparable] struct {
	Values []T
}

func NewEqualComparer

func NewEqualComparer[T comparable](values ...T) *AnyEqualComparer[T]

func (AnyEqualComparer[T]) Compare

func (c AnyEqualComparer[T]) Compare(value T) (bool, error)

type Comparer

type Comparer[T comparable] interface {
	Compare(T) (bool, error)
}

func New

func New[T comparable](f func(T) (bool, error)) Comparer[T]

type Function

type Function[T comparable] func(T) (bool, error)

func (Function[T]) Compare

func (f Function[T]) Compare(input T) (bool, error)

Jump to

Keyboard shortcuts

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