This commit primarily reorders the modes in the "mode_test.go" file for consistency. The order is now; ModeHumanReadable, ModeLowerCase, ModeNumber, ModeSpecial, ModeUpperCase. This now follows a logical order instead of the previous semi arbitrary one.
The commit also involves the addition of a new test case 'TestModesFromFlags' in the "mode_test.go" file. This test case aims at increasing the code coverage and ensuring modes obtained from the flags are correct.
Lastly, the 'ModesFromFlags' function in the "mode.go" has been slightly refactored for improved readability. This does not change the functionality and thus won't affect the rest of the codebase.
The naming and handling of mode bitmasks have been refactored for improved code readability and maintainability. The term "Mode" was replaced with "ModeMask" for clarity and all associated functions were renamed accordingly (e.g., "SetMode" to "MaskSetMode"). These changes provide better insight into the function of the code and increase understandability for future development efforts. The command-line utility now also supports specifying modes via the "-M" flag.
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.