genericcomparator

package
v0.0.0-...-25ef478 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0, BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Comparator

func Comparator(a, b interface{}) int

Comparator implements a function that compares the builtin basic types of Go and that returns -1 if a is smaller than b, 1 if a is bigger than b and 0 if both values are equal.

Types

type Type

type Type func(a interface{}, b interface{}) int

Type defines the type of the generic Comparator that compares two values and returns -1 if a is smaller than b, 1 if a is bigger than b and 0 if both values are equal.

Jump to

Keyboard shortcuts

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