-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved readability and reduced redundancy in factory.go
Refactored `FactoryMode` and `Handle` functions in factory.go to improve readability and reduce redundancy. Variables `user`, `pass` and `err` are now declared once and their values updated as necessary, replacing the previous repetitious method of returning a new instance of these variables upon each error. The `tlUser`, `tlPass`, and `err` variables in the `Handle` function have also been updated to follow this new method. This change enhances the readability of the code and prevents the unnecessary multiple declarations and returns of the same variables. It also aligns with the DRY (Don't Repeat Yourself) principle making the codebase maintainable.
- Loading branch information
1 parent
ccf4bb1
commit 723dbeb
Showing
1 changed file
with
20 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters