nanoid

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlphanumeric

func IsAlphanumeric(s string) bool

IsAlphanumeric checks if a string contains only alphanumeric characters

func IsPrimaryKey

func IsPrimaryKey(id string) bool

IsPrimaryKey verifies if a string is a valid primary key

func Lower

func Lower(l ...int) string

Lower generates a NanoID using only lowercase letters with optional length

func Must

func Must(l ...int) string

Must generates a NanoID with optional length using default alphabet

func Number

func Number(l ...int) string

Number generates a NanoID using only numbers with optional length

func PrimaryKey

func PrimaryKey(l ...int) func() string

PrimaryKey returns a function that generates primary keys with specified length

func String

func String(l ...int) string

String generates a NanoID using only letters with optional length

func Upper

func Upper(l ...int) string

Upper generates a NanoID using only uppercase letters with optional length

Types

This section is empty.

Jump to

Keyboard shortcuts

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