stringgen

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RandString

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

RandString is not a secure random generator.

func Default

func Default() *RandString

Default returns a new *RandString seeded with time.Now().UnixNano() and with charset of "1234567890abcdefghijklmnopqrstuvwxyz"

func NewRand

func NewRand(source rand.Source, chars []rune) *RandString

NewRand returns a not secure random string generator.

func (*RandString) Generate

func (r *RandString) Generate(n int) string

Generate generates a not secure random string with length n.

type StringGenerator

type StringGenerator interface {
	Generate(int) string
}

StringGenerator generates a string with specified length

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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