utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2016 License: BSD-2-Clause Imports: 1 Imported by: 1,096

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntComparator

func IntComparator(a, b interface{}) int

func Sort

func Sort(values []interface{}, comparator Comparator)

Sorts values (in-place) using timsort

func StringComparator

func StringComparator(a, b interface{}) int

Types

type Comparator

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

Comparator will make type assertion (see IntComparator for example), which will panic if a or b are not of the asserted type.

Should return:

-1, if a < b
 0, if a == b
 1, if a > b

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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