Skip to content

Releases: Kapparina/LinuxUtils

Release list

v0.2.0

Choose a tag to compare

@Kapparina Kapparina released this 31 Jan 05:26
4c714fb

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 PathInfo type 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.Base instead 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.Fatal calls 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 shouldExit control channel to better manage the lifecycle of the watch command. (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 color library (github.com/fatih/color) with github.com/charmbracelet/lipgloss and github.com/charmbracelet/log for 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 Debugf logs with Debug for 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 watch command 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.mod and go.sum to 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.