rand

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package rand provides utilities to generate random data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float64

func Float64() float64

Float64 returns, as a float64, a pseudo-random number in [0.0,1.0).

func Int31n

func Int31n(n int32) int32

Int31n returns, as an int32, a non-negative pseudo-random number in [0,n). It panics if n <= 0.

func Int63

func Int63() int64

Int63 returns a non-negative pseudo-random 63-bit integer as an int64.

func Seed

func Seed(s int64)

Seed uses the provided seed value to initialize the generator to a deterministic state.

func String added in v1.8.0

func String(n int) string

String returns a random string of n characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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