func RandomInt64(n int64) (x int64) {
	rnd := rndGen.GetRand()
	if n == 0 {
		x = rnd.Int63()
	} else {
		x = rnd.Int63n(n)
	}
	rndGen.PutRand(rnd)
	return
}
RandomInt64 produces a pseudo-random 63bit number, if n == 0 there will be no limit otherwise
the output will be smaller than n
package tools
import (
	"crypto/rand"
	"encoding/binary"
	mathRand "math/rand"
	"sync"
	_ "unsafe"
)
const (
	digits              = "0123456789"
	digitsLength        = uint32(len(digits))
	alphaNumerics       = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
	alphaNumericsLength = uint32(len(alphaNumerics))
)
func FastRand() uint32
type randomGenerator struct {
	sync.Pool
}
func (rg *randomGenerator) GetRand() *mathRand.Rand {
	return rg.Get().(*mathRand.Rand)
}
func (rg *randomGenerator) PutRand(r *mathRand.Rand) {
	rg.Put(r)
}
var rndGen randomGenerator
func init() {
	rndGen.New = func() interface{} {
		x := mathRand.New(mathRand.NewSource(CPUTicks()))
		return x
	}
}
func RandomID(n int) string {
	rnd := rndGen.GetRand()
	b := make([]byte, n)
	for i := range b {
		b[i] = alphaNumerics[FastRand()%alphaNumericsLength]
	}
	rndGen.PutRand(rnd)
	return ByteToStr(b)
}
func RandomIDs(n ...int) []string {
	var str = make([]string, 0, len(n))
	for _, x := range n {
		str = append(str, RandomID(x))
	}
	return str
}
func RandomDigit(n int) string {
	rnd := rndGen.GetRand()
	b := make([]byte, n)
	for i := 0; i < len(b); i++ {
		b[i] = digits[FastRand()%digitsLength]
	}
	rndGen.PutRand(rnd)
	return ByteToStr(b)
}