Refactor Generator struct and New function in apg.go

Removed the unused 'charRange' field from the Generator struct. Also, renamed the parameter in the New function from 'c' to 'config' for better clarity and understanding of its purpose.
This commit is contained in:
Winni Neessen 2024-03-08 10:21:57 +01:00
parent e17da1a2c9
commit 61ca9af22a
Signed by: wneessen
GPG key ID: 385AC9889632126E

6
apg.go
View file

@ -5,15 +5,13 @@ const VERSION = "2.0.0"
// Generator is the password generator type of the APG package
type Generator struct {
// charRange is the range of character used for the
charRange string
// config is a pointer to the apg config instance
config *Config
}
// New returns a new password Generator type
func New(c *Config) *Generator {
func New(config *Config) *Generator {
return &Generator{
config: c,
config: config,
}
}