Help us shape the future of Go! Take the 2026 Go Developer Survey

password

package
v2.3.5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 2 Imported by: 10

Documentation

Overview

Package password contains a simple password generator.

Index

Constants

This section is empty.

Variables

View Source
var Default = Settings{
	CharacterSet: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
	Length:       27,
}

Default password generation settings.

Functions

func Generate

func Generate() (string, error)

Generate a random, 27 character password that may consist of lowercase letters, uppercase letters, or numbers.

Types

type Settings

type Settings struct {
	// CharacterSet of allowed password characters.
	CharacterSet string

	// Length of generated passwords.
	Length int
}

Settings for password generation.

func (Settings) Generate

func (s Settings) Generate() (string, error)

Generate a password.

Jump to

Keyboard shortcuts

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