compare

package
v0.0.0-...-ad801e6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolCompare

func BoolCompare(v1, v2 bool) int

BoolCompare compares two boolean values, and returns * -1 if v1 < v2 * 0 if v1 == v2 * 1 if v1 > v2

func BytesCompare

func BytesCompare(v1, v2 xbytes.Bytes) int

BytesCompare compares two string values, and returns * -1 if v1 < v2 * 0 if v1 == v2 * 1 if v1 > v2

func DoubleCompare

func DoubleCompare(v1, v2 float64) int

DoubleCompare compares two double values, and returns * -1 if v1 < v2 * 0 if v1 == v2 * 1 if v1 > v2

func IntCompare

func IntCompare(v1, v2 int) int

IntCompare compares two int values, and returns * -1 if v1 < v2 * 0 if v1 == v2 * 1 if v1 > v2

func RawBytesCompare

func RawBytesCompare(v1, v2 []byte) int

RawBytesCompare compares two raw byte slices.

func ReverseBoolCompare

func ReverseBoolCompare(v1, v2 bool) int

ReverseBoolCompare reverse compares two boolean values.

func ReverseDoubleCompare

func ReverseDoubleCompare(v1, v2 float64) int

ReverseDoubleCompare reverse compares two double values.

func ReverseIntCompare

func ReverseIntCompare(v1, v2 int) int

ReverseIntCompare reverse compares two boolean values.

func ReverseRawBytesCompare

func ReverseRawBytesCompare(v1, v2 []byte) int

ReverseRawBytesCompare reverse compares two raw byte slices.

func ReverseTimeCompare

func ReverseTimeCompare(v1, v2 int64) int

ReverseTimeCompare reverse compares two time values.

func TimeCompare

func TimeCompare(v1, v2 int64) int

TimeCompare compares two time values, and returns * -1 if v1 < v2 * 0 if v1 == v2 * 1 if v1 > v2

Types

type BoolCompareFn

type BoolCompareFn func(v1, v2 bool) int

BoolCompareFn compares two boolean values.

type BytesCompareFn

type BytesCompareFn func(v1, v2 []byte) int

BytesCompareFn compares two string values.

type DoubleCompareFn

type DoubleCompareFn func(v1, v2 float64) int

DoubleCompareFn compares two double values.

type IntCompareFn

type IntCompareFn func(v1, v2 int) int

IntCompareFn compares two int values.

type TimeCompareFn

type TimeCompareFn func(v1, v2 int64) int

TimeCompareFn compares two time values.

Jump to

Keyboard shortcuts

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