Documentation ¶
Index ¶
- func ByteCountIEC(b int64) string
- func ByteCountSI(b int64) string
- func ConvertSize(bytes float64, dimension string) float64
- func GenerateSequentialFloat32Array(length int) []float32
- func GenerateSequentialIntArray(length int) []int
- func Marshal(data interface{}) string
- func MarshalIndent(data interface{}) string
- func RandomByte(length int) []byte
- func RandomFloat32(min, max float32) float32
- func RandomFloat64(min, max float64) float64
- func RandomInt(min, max int) int
- func RandomInt32(min, max int32) int32
- func RandomInt64(min, max int64) int64
- type RandomGenerator
- func (rander RandomGenerator) RandomFloat32(min, max float32) float32
- func (rander RandomGenerator) RandomFloat32Array(min, max float32, length int) []float32
- func (rander RandomGenerator) RandomFloat64(min, max float64) float64
- func (rander RandomGenerator) RandomFloat64Array(min, max float64, length int) []float64
- func (rander RandomGenerator) RandomInt(min, max int) int
- func (rander RandomGenerator) RandomInt32(min, max int32) int32
- func (rander RandomGenerator) RandomInt32Array(min, max int32, length int) []int32
- func (rander RandomGenerator) RandomInt64(min, max int64) int64
- func (rander RandomGenerator) RandomInt64Array(min, max int64, length int) []int64
- func (rander RandomGenerator) RandomIntArray(min, max, length int) []int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteCountIEC ¶
ByteCountIEC convert the byte in input to MB/KB/TB ecc
func ByteCountSI ¶
ByteCountSI convert the byte in input to MB/KB/TB ecc
func ConvertSize ¶ added in v0.0.18
ConvertSize is delegated to return the dimension related to the input byte size
func GenerateSequentialFloat32Array ¶ added in v0.0.14
GenerateSequentialFloat32Array is delegated to generate an array of sequential number
func GenerateSequentialIntArray ¶ added in v0.0.14
GenerateSequentialIntArray is delegated to generate an array of sequential number
func MarshalIndent ¶ added in v0.0.43
func MarshalIndent(data interface{}) string
func RandomByte ¶ added in v0.0.41
RandomByte is delegated to generate a byte array with the given input length
func RandomFloat32 ¶ added in v0.0.14
RandomFloat32 initialize a new seed using the UNIX Nano time and return a float32 between the 2 input value
func RandomFloat64 ¶ added in v0.0.14
RandomFloat64 initialize a new seed using the UNIX Nano time and return a float64 between the 2 input value
func RandomInt ¶ added in v0.0.2
RandomInt initialize a new seed using the UNIX Nano time and return an integer between the 2 input value
func RandomInt32 ¶ added in v0.0.14
RandomInt32 initialize a new seed using the UNIX Nano time and return an integer between the 2 input value
func RandomInt64 ¶ added in v0.0.14
RandomInt64 initialize a new seed using the UNIX Nano time and return an integer between the 2 input value
Types ¶
type RandomGenerator ¶ added in v0.0.14
type RandomGenerator struct {
// contains filtered or unexported fields
}
RandomGenerator is delegated to generate random without call seed every time
func InitRandomizer ¶ added in v0.0.14
func InitRandomizer() RandomGenerator
InitRandomizer initialize a new RandomGenerator
func (RandomGenerator) RandomFloat32 ¶ added in v0.0.14
func (rander RandomGenerator) RandomFloat32(min, max float32) float32
RandomFloat32 initialize a new seed using the UNIX Nano time and return a float32 between the 2 input value
func (RandomGenerator) RandomFloat32Array ¶ added in v0.0.14
func (rander RandomGenerator) RandomFloat32Array(min, max float32, length int) []float32
RandomFloat32Array return a new array with random number from min to max of length len
func (RandomGenerator) RandomFloat64 ¶ added in v0.0.14
func (rander RandomGenerator) RandomFloat64(min, max float64) float64
RandomFloat64 initialize a new seed using the UNIX Nano time and return a float64 between the 2 input value
func (RandomGenerator) RandomFloat64Array ¶ added in v0.0.14
func (rander RandomGenerator) RandomFloat64Array(min, max float64, length int) []float64
RandomFloat64Array return a new array with random number from min to max of length len
func (RandomGenerator) RandomInt ¶ added in v0.0.14
func (rander RandomGenerator) RandomInt(min, max int) int
RandomInt initialize a new seed using the UNIX Nano time and return an integer between the 2 input value
func (RandomGenerator) RandomInt32 ¶ added in v0.0.14
func (rander RandomGenerator) RandomInt32(min, max int32) int32
RandomInt32 initialize a new seed using the UNIX Nano time and return an integer between the 2 input value
func (RandomGenerator) RandomInt32Array ¶ added in v0.0.14
func (rander RandomGenerator) RandomInt32Array(min, max int32, length int) []int32
RandomInt32Array return a new array with random number from min to max of length len
func (RandomGenerator) RandomInt64 ¶ added in v0.0.14
func (rander RandomGenerator) RandomInt64(min, max int64) int64
RandomInt64 initialize a new seed using the UNIX Nano time and return an integer between the 2 input value
func (RandomGenerator) RandomInt64Array ¶ added in v0.0.14
func (rander RandomGenerator) RandomInt64Array(min, max int64, length int) []int64
RandomInt64Array return a new array with random number from min to max of length len
func (RandomGenerator) RandomIntArray ¶ added in v0.0.14
func (rander RandomGenerator) RandomIntArray(min, max, length int) []int
RandomIntArray return a new array with random number from min to max of length len