gorandom

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2017 License: MIT Imports: 5 Imported by: 0

README

go-random

Build Status License Coverage Status

Simple way to generate random values for Golang.

v1.0.0 status

Features

  • Random string
  • Random bytes
  • Random int64, int32, int and int16
  • Random float64 and float32

Installation

go get -u github.com/WindomZ/go-random

License

The MIT License

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyBytes []byte = []byte{}

Functions

func Int64ToBytes

func Int64ToBytes(i int64) []byte

func RandomAlphabet

func RandomAlphabet(n int) string

func RandomBytes

func RandomBytes(n int) []byte

func RandomBytesByTime

func RandomBytesByTime(n int) []byte

func RandomCaptcha

func RandomCaptcha(n int) string

func RandomFloat32

func RandomFloat32() float32

func RandomFloat32n

func RandomFloat32n(n int32) float32

func RandomFloat64

func RandomFloat64() float64

func RandomFloat64n

func RandomFloat64n(n int64) float64

func RandomHexString

func RandomHexString(n int) string

func RandomInt

func RandomInt() int

func RandomInt16

func RandomInt16() int16

func RandomInt16n

func RandomInt16n(n int16) int16

func RandomInt32

func RandomInt32() int32

func RandomInt32n

func RandomInt32n(n int32) int32

func RandomInt64

func RandomInt64() int64

func RandomInt64n

func RandomInt64n(n int64) int64

func RandomIntn

func RandomIntn(n int) int

func RandomJson

func RandomJson(n int) string

func RandomNumCaptcha

func RandomNumCaptcha(n int) string

func RandomString

func RandomString(n int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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