nanoid

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 3 Imported by: 1

README

NanoID Generator

Installation

go get -u github.com/Metadiv-Technology-Limited/nanoid

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts Opts) string

New returns a random string with the given options.

func NewSafe

func NewSafe() string

NewSafe quickly returns a random string with the safe options.

Types

type Opts

type Opts struct {
	Numbers   bool
	Lowercase bool
	Uppercase bool
	/*
		Symbols are "_-"
	*/
	Symbols bool
	/*
		LookAlike are "1lI0Oouv5Ss"
	*/
	ExcludeAlike bool
	Length       int
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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