utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 3 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpJSON

func DumpJSON(r interface{}) string

DumpJSON dumps a json-compatible struct in human-readable form

func SortUint64s

func SortUint64s(a []uint64)

SortUint64s sorts a slice of uint64 in increasing order.

Types

type Uint64Slice

type Uint64Slice []uint64

Uint64Slice implmenents sort.Interface for a slice of uint64.

func (Uint64Slice) Len

func (s Uint64Slice) Len() int

Len returns the length of an UintSlice

func (Uint64Slice) Less

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

Less returns true if element at 'i' is less than the element at 'j'

func (Uint64Slice) Swap

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

Swap swaps the values of two elements

Jump to

Keyboard shortcuts

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