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

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