sorter

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type By

type By func(m1, m2 *types.MessageLog) bool

By is the type of a "less" function that defines the ordering of its Planet arguments.

func (By) Sort

func (by By) Sort(messageLogs []*types.MessageLog)

Sort is a method on the function type, By, that sorts the argument slice according to the function.

type MessageLogsSorter

type MessageLogsSorter struct {
	// contains filtered or unexported fields
}

MessageLogSorter joins a By function and a slice of messageLogs to be sorted.

func (*MessageLogsSorter) Len

func (s *MessageLogsSorter) Len() int

Len is part of sort.Interface.

func (*MessageLogsSorter) Less

func (s *MessageLogsSorter) Less(i, j int) bool

less is part of sort.Interface. It is implemented by calling the "by" closure in the sorter.

func (*MessageLogsSorter) Swap

func (s *MessageLogsSorter) Swap(i, j int)

Swap is part of sort.Interface.

Jump to

Keyboard shortcuts

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