package random

import "github.com/labstack/gommon/random"

Index

Functions

func SetCharset

func SetCharset(c Charset)

func String

func String(length uint8) string

Types

type Charset

type Charset string
const (
	Alphanumeric Charset = Alphabetic + Numeric
	Alphabetic   Charset = "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	Numeric      Charset = "0123456789"
	Hex          Charset = Numeric + "abcdef"
)

type Random

type Random struct {
	// contains filtered or unexported fields
}

func New

func New() *Random

func (*Random) SetCharset

func (r *Random) SetCharset(c Charset)

func (*Random) String

func (r *Random) String(length uint8) string

Source Files

random.go

Version
v0.1.0
Published
Oct 23, 2016
Platform
linux/amd64
Imports
2 packages
Last checked
1 minute ago

Tools for package owners.