random

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package random contains different random generators.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Random

func Random(min int, max int) int

Random generates a random int between min and max, inclusive.

func RandomInt

func RandomInt(elements []int) int

RandomInt picks a random element in the slice of ints.

func RandomString

func RandomString(elements []string) string

RandomString picks a random element in the slice of string.

func UniqueId

func UniqueId() string

UniqueId returns a unique (ish) id we can attach to resources and tfstate files so they don't conflict with each other Uses base 62 to generate a 6 character string that's unlikely to collide with the handful of tests we run in parallel. Based on code here: http://stackoverflow.com/a/9543797/483528

Types

This section is empty.

Jump to

Keyboard shortcuts

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