shortid

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Base58CharacterSet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ShortID

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

func NewShortID

func NewShortID(alphabet string) *ShortID

NewShortID returns a new ShortID instance.

func (*ShortID) Generate

func (s *ShortID) Generate(length int) (string, error)

A cryptographically secure, random, base58-encoded string.

Jump to

Keyboard shortcuts

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