utils

package
v1.2.13 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextID

func NextID() (uint64, error)

func ParseFloat64

func ParseFloat64(s string) float64

func ParseInt

func ParseInt(s string) int

func SortInt64 added in v1.2.6

func SortInt64(a []int64)

SortInt64 sorts a slice of int64s in increasing order.

Types

type IdGenerate

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

func NewIdGenerate

func NewIdGenerate(baseTime time.Time) *IdGenerate

func (*IdGenerate) Next

func (g *IdGenerate) Next() int64

type SortInt64Slice added in v1.2.6

type SortInt64Slice []int64

SortInt64Slice attaches the methods of Interface to []int64, sorting in increasing order.

func (SortInt64Slice) Len added in v1.2.6

func (p SortInt64Slice) Len() int

func (SortInt64Slice) Less added in v1.2.6

func (p SortInt64Slice) Less(i, j int) bool

func (SortInt64Slice) Swap added in v1.2.6

func (p SortInt64Slice) Swap(i, j int)

Jump to

Keyboard shortcuts

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