mirror of
https://github.com/wneessen/apg-go.git
synced 2024-12-23 03:30:39 +01:00
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:
parent
e17da1a2c9
commit
61ca9af22a
1 changed files with 2 additions and 4 deletions
6
apg.go
6
apg.go
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue