gopassgen

package module
v0.0.0-...-f1a72d3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 3 Imported by: 0

README

GoPassGen

Godoc license

A simple Go package to generate random passwords based on user-defined criteria.

Usage

import "github.com/Mubashir01234/gopassgen"

o := gopassgen.New(gopassgen.Options{
	Length:     12,
	HasLower:   true,
	HasUpper:   true,
	HasSymbols: true,
	HasNumbers: true,
})

password, err := o.GeneratePassword()
if err != nil {
	fmt.Println("Error generating password:", err)
	return
}
fmt.Println(password)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opt Options) *passgen

New creates a new Options for generate passwords.

Types

type Options

type Options struct {
	Length     int
	HasLower   bool
	HasUpper   bool
	HasSymbols bool
	HasNumbers bool
}

Jump to

Keyboard shortcuts

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