random

package module
v0.0.0-...-aa9c27f Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: Unlicense Imports: 1 Imported by: 0

README

random

Simple Random Strings & Ints for Go

Build Status GoDoc GoReportCard

Install:
go get -u github.com/powelles/random
Usage:
package main

import (
    "fmt"

    "github.com/powelles/random"
)

func main() {
    newRandomString := random.String(10)
    fmt.Println(newRandomString)

    newRandomInt := random.Int(100)
    fmt.Println(newRandomInt)
}

Documentation

Overview

Package random easily generates crypto random strings and ints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int

func Int(n int) int

Int takes an int as max value and returns a random int between 0 and max value.

func String

func String(n int) string

String takes an int as string length and returns a random alphanumeric string of the requested length.

Types

This section is empty.

Jump to

Keyboard shortcuts

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