random

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: May 26, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Random

func Random(min int, max int) int

Generate a random int between min and max, inclusive

func RandomInt

func RandomInt(elements []int) int

Pick a random element in the slice of ints

func RandomString

func RandomString(elements []string) string

Pick a random element in the slice of string

func UniqueId

func UniqueId() string

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