random

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: MIT Imports: 4 Imported by: 0

README

Random

Godoc Release Build

A Golang library that provides functions for generating random values.

Usage

See random_test.go

Test

# Test everything:
make test

# For BDD development:
# It will open a new browser window. Make sure:
#   1. There is no errors on the terminal window.
#   2. There is no other open GoConvey page.
make test-ui

# Benchmarks
make test-benchmarks

Release

# Update and commit CHANGELOG.md first (i.e. git add CHANGELOG.md && git commit -m "v1.0.0").
# Set GIT_TAG using semver (i.e. GIT_TAG=v1.0.0)
make release GIT_TAG=

Contributing

See CONTRIBUTING.md

License

Licensed under The MIT License (MIT)
For the full copyright and license information, please view the LICENSE.txt file.

Documentation

Overview

Package random provides functions for generating random values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Millisecond

func Millisecond(min, max int64) time.Duration

Millisecond returns a random amount of millisecond by the given range.

func MustBytes

func MustBytes(n int, secure bool) []byte

MustBytes generates random bytes or panics on error.

func MustULID

func MustULID(secure bool) string

MustULID returns a ULID or panics on error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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