utils

package
v0.0.0-...-af59c4b Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NumbersCharset   = "0123456789"
	UpperCaseCharset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	LowerCaseCharset = "abcdefghijklmnopqrstuvwxyz"
	AlphaCharset     = NumbersCharset + UpperCaseCharset + LowerCaseCharset
)

Variables

This section is empty.

Functions

func Exists

func Exists(path string) (bool, error)

func RandBytes

func RandBytes(size int64) ([]byte, error)

func RandFloat64

func RandFloat64(min float64, max float64) float64

func RandFromRange

func RandFromRange(r *mathf.Range) float64

func RandInt64

func RandInt64(min int64, max int64) int64

func RandIntn

func RandIntn(n int) int

func RandString

func RandString(size int64) (string, error)

func RandStringWithCharset

func RandStringWithCharset(length int, charset string) string

func SystemMillis

func SystemMillis() float64

func SystemSeconds

func SystemSeconds() float64

Types

type IDCounter

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

func NewIDCounter

func NewIDCounter() *IDCounter

func (*IDCounter) Next

func (counter *IDCounter) Next() int64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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