sorters

package
v0.0.0-...-302b7e5 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: ISC Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Int64Slice

type Int64Slice []int64

Int64Slice implements sort.Interface to allow a slice of timestamps to be sorted.

func (Int64Slice) Len

func (s Int64Slice) Len() int

Len returns the number of timestamps in the slice. It is part of the sort.Interface implementation.

func (Int64Slice) Less

func (s Int64Slice) Less(i, j int) bool

Less returns whether the timstamp with index i should sort before the timestamp with index j. It is part of the sort.Interface implementation.

func (Int64Slice) Sort

func (s Int64Slice) Sort()

Sort is a convenience method: s.Sort() calls sort.Sort(s).

func (Int64Slice) Swap

func (s Int64Slice) Swap(i, j int)

Swap swaps the timestamps at the passed indices. It is part of the sort.Interface implementation.

Jump to

Keyboard shortcuts

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