apg-go/apg.go
Winni Neessen ac97b94ec9
Refactor generator and add config options
Refactored the generator to include a new config option, changed function signatures to follow the new structure, and renamed the function 'RandomString' to 'RandomStringFromCharRange' for clarity. Also, added a new mode and algorithm feature to enhance password generation. Furthermore, added several tests for new features and configurations. Adapted the CLI to use the new configuration approach. This refactoring was necessary to improve the customizability and clarity of the password generation process. Fixed minor issues and added '.gitignore' for clean commits in the future.
2023-08-04 16:02:58 +02:00

19 lines
423 B
Go

package apg
// VERSION represents the version string
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 {
return &Generator{
config: c,
}
}