Repository navigation
Releases: Kapparina/LinuxUtils
Releases · Kapparina/LinuxUtils
Release list
v0.2.0
v0.2.0 Changelog
Release Associated Commit Date: July 8, 2024
New Features & Enhancements
Path Validation Enhancements
- Added support for handling
~in file paths, replacing it with the user's home directory for better compatibility. (pkg/io/files.go) - Introduced a new
PathInfotype with enhanced validation and truncation methods to simplify path handling. (pkg/io/files.go)
Watcher Service Updates
- Simplified signal handling for the watcher process to make signal management more robust and reliable. (cmd/watch/main.go)
- Adjusted logging to display file names using
filepath.Baseinstead of event names for clarity. (cmd/watch/main.go) - Removed the unused "quit" channel that was causing redundant code. (cmd/watch/main.go)
Error Handling Improvements
- Replaced
log.Fatalcalls with more descriptive error messages, improving clarity and debugging experience. (cmd/watch/main.go) - Expanded error logging to enhance feedback while handling invalid user inputs or startup failures. (cmd/watch/main.go)
- Added a
shouldExitcontrol channel to better manage the lifecycle of thewatchcommand. (cmd/watch/main.go)
Logging System Overhaul
- Integrated a new customizable logging system:
- Introduced logging level styles with configurable colors and bold text for better readability. (logging.go)
- Replaced the previous
colorlibrary (github.com/fatih/color) withgithub.com/charmbracelet/lipglossandgithub.com/charmbracelet/logfor enhanced logging flexibility and consistency. (logging.go, cmd/watch/main.go)
- Simplified log messages with
MinimalLog, offering concise and focused outputs for debugging and monitoring. (cmd/watch/logging.go)
Structured Logging for Watcher
- Replaced
Debugflogs withDebugfor consistency and better log formatting. (cmd/watch/main.go) - Enhanced start and end logs in the watcher to include contextual information such as target fields for better traceability. (cmd/watch/main.go)
- Implemented structured logging for watch logs, improving parsing and debugging workflows. (cmd/watch/main.go, logging.go)
Refactoring
- Refactored all log entries in the
watchcommand to maintain consistency and improve readability. (cmd/watch/main.go) - Cleaned up unused variables and channels across the codebase for optimized execution and maintainability. (cmd/watch/main.go, pkg/io/files.go)
- Updated dependencies and libraries in
go.modandgo.sumto align with the new logging system and functionality. (go.mod, go.sum)
Acknowledgments
Thanks to Kapparina for spearheading this release through thoughtful improvements, extensive refactoring, and valuable new features.
This update focuses on enhancing the core functionality of the project by improving path handling, error logging, and the logging system, as well as streamlining code structure for future scalability.