Skip to content

feat: Add verbose flag (-v, --verbose) for enhanced system messages#4

Merged
heinrichb merged 1 commit intodevelopfrom
develop-verbose
Feb 16, 2025
Merged

feat: Add verbose flag (-v, --verbose) for enhanced system messages#4
heinrichb merged 1 commit intodevelopfrom
develop-verbose

Conversation

@heinrichb
Copy link
Copy Markdown
Collaborator

  • Introduced a global Verbose flag in config.go to manage debug output.
  • Registered --verbose (-v) flag in main.go for user control.
  • Modified Load() in config.go to conditionally display PrintNonEmptyFields() output when Verbose is enabled.
  • Updated CLI tests in main_test.go to validate proper handling of CLI arguments.
  • Improved TestCLIOverrides to dynamically verify CLI argument overrides.
  • Standardized flag registration and execution flow for better maintainability.
  • Ensured verbose output is globally accessible without needing to pass it through function calls.

This change improves debugging by allowing users to toggle detailed output while keeping default behavior concise.

- Introduced a global `Verbose` flag in `config.go` to manage debug output.
- Registered `--verbose` (`-v`) flag in `main.go` for user control.
- Modified `Load()` in `config.go` to conditionally display `PrintNonEmptyFields()` output when `Verbose` is enabled.
- Updated CLI tests in `main_test.go` to validate proper handling of CLI arguments.
- Improved `TestCLIOverrides` to dynamically verify CLI argument overrides.
- Standardized flag registration and execution flow for better maintainability.
- Ensured verbose output is globally accessible without needing to pass it through function calls.

This change improves debugging by allowing users to toggle detailed output while keeping default behavior concise.
@heinrichb heinrichb merged commit f2f4d44 into develop Feb 16, 2025
1 check passed
@heinrichb heinrichb deleted the develop-verbose branch February 16, 2025 01:58
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 16, 2025

Codecov Report

Attention: Patch coverage is 64.36782% with 31 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/scrapeycli/main.go 20.00% 16 Missing ⚠️
pkg/config/config.go 77.61% 12 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant