base

package
v0.0.0-...-33e21ae Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool2Int

func Bool2Int(b bool) int

func CmpComparable

func CmpComparable[T comparable](a, b T) int

func CmpOrdered

func CmpOrdered[T constraints.Ordered](a, b T) int

func Max

func Max[T constraints.Ordered](a, b T) T

func MaxWithCmp

func MaxWithCmp[T any](a, b T, cmp Comparator[T]) T

func Min

func Min[T constraints.Ordered](a, b T) T

func MinWithCmp

func MinWithCmp[T any](a, b T, cmp Comparator[T]) T

Types

type Comparator

type Comparator[T any] func(T, T) int

func ReverseCmp

func ReverseCmp[T any](cmp Comparator[T]) Comparator[T]

func SliceCmp

func SliceCmp[T any](cmp Comparator[T]) Comparator[[]T]

Jump to

Keyboard shortcuts

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