utils

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 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 ParseBool

func ParseBool(s string) bool

func ParseFloat64

func ParseFloat64(s string) float64

func ParseInt

func ParseInt(s string) int

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