Commit graph

9 commits

Author SHA1 Message Date
79f921f9ad
Add .gitgnore and SPDX headers in several files
This commit introduces the .gitignore configuration file and adds SPDX headers to several files including test and documentation files. The headers provide license information in a standardized format which can be easily picked up by automated tools for license compliance checks. Additionally, it deleted a .idea/.gitignore file, which is a project specific IDE configuration file not necessary for the repository. It also introduced a README.md file providing more insightful information about the project.
2024-03-12 20:59:07 +01:00
1c22c9b8f0
Refactor error message in mode_test.go
The error message format in `ModesFromFlags()` method within `mode_test.go` has been refactored. The refactoring improved the clarity and conciseness of error reporting when the expected mode is not found during test execution.
2024-03-08 17:08:05 +01:00
e17da1a2c9
Improve code readability by refactoring variable names
Several variable names have been changed in 'random.go' to improve overall readability and code comprehension. Additionally, a typo was fixed and a new constant was introduced for the maximum value of Int32, to replace previously hard-coded values. The adjustments not only make the code more digestible, but also adhere to good coding practices.
2024-03-07 23:22:28 +01:00
c3eb80a183
Correct "Number" to "Numeric" in mode_test.go
The string representation for the "ModeNumeric" enumeration member was incorrectly labeled as "Number". This has been corrected to "Numeric" in the mode tests file mode_test.go to maintain correct and consistent naming conventions.
2024-03-07 21:22:24 +01:00
af6d87c1a3
#53 and #52: Update "Number" references to "Numeric" in password generator
Replaced all instances of "Number" with "Numeric" in the password
generator. This modification will make the password generation code
more intuitive and readable. Moreover, minimum character requirements
were added for each character type, giving more flexibility to the
password generation settings.
2023-08-05 17:54:41 +02:00
3cccc65498
#53 Add ModeHumanReadable and refactor mode tests
Updated mode tests to include a new Mode, ModeHumanReadable, and created an additional test case, ModeComplexNoHumanReadable. This was done because a more human readable mode was required for some use cases. Also added a test function TestMode_String to ensure the .String() method of each mode works as intended.
2023-08-04 20:29:43 +02:00
f3a4b516d1
Reorder modes and add new test for modes
The ordering of modes in the existing test was changed to logically group them together. In addition, a new test was added, `TestModesFromFlags`, to cover multiple different conditions including complex modes and cases where certain mode elements are excluded. This expansion in testing enhances our coverage of varied mode settings.
2023-08-04 18:38:55 +02:00
b31219046a
#53 Refactor mode handling and bitmask functions
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.
2023-08-04 17:14:24 +02:00
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