-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Improve code quality and readability of UFW updater script
This commit refactors the Cloudflare UFW updater script to improve code quality, readability, and maintainability. The following improvements were made: 1. Simplified dependency, permission, and version checks using `||` for conciseness. - Reduced nesting by using `{` and `}` to group commands. - Improved error handling by consistently exiting with non-zero code after logging errors. - Added clearer comments to explain the purpose of each function. - Combined IPv4 and IPv6 fetching into a single function. - Simplified the logic for skipping comments in the restore function. - Improved code readability with consistent spacing and indentation.
- Loading branch information
1 parent
3790c75
commit 6f901fe
Showing
1 changed file
with
30 additions
and
34 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