utils

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: Apache-2.0 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 ParseIntString added in v0.0.3

func ParseIntString(n int64) string

func SortInt64

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

type SortInt64Slice []int64

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

func (SortInt64Slice) Len

func (p SortInt64Slice) Len() int

func (SortInt64Slice) Less

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

func (SortInt64Slice) Swap

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