nanoid

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(alphabet string, size int) (string, error)

Generate is a low-level function to change alphabet and ID size.

func Must

func Must(l ...int) string

Must is the same as New but panics on error.

func MustGenerate

func MustGenerate(alphabet string, size int) string

MustGenerate is the same as Generate but panics on error.

func New

func New(l ...int) (string, error)

New generates secure URL-friendly unique ID. Accepts optional parameter - length of the ID to be generated (21 by default).

Types

This section is empty.

Jump to

Keyboard shortcuts

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