* Initial plan
* Remove cosign signing and improve GoReleaser configuration
- Removed cosign-installer step from release workflow
- Removed cosign signing sections (signs and docker_signs) from .goreleaser.yml
- Added include_meta: true to release configuration
- Added use: github and format to changelog configuration
- Added before hooks section for go mod tidy and go generate
- Improved comments and structure following best practices
- Added proper step names to workflow for better readability
- Kept attestation steps for checksums.txt and digests.txt using GitHub's native attestation
Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
The format flag now supports multiple input syntaxes for better user experience:
- Space-separated: --format webp or -f webp
- Equals syntax: --format=webp
- Case-insensitive: webp, WEBP, and WebP are all valid
This change centralizes format flag setup in setupFormatFlag() function,
making it consistent across optimize and watch commands while supporting
both command-line usage and viper configuration binding.
The improvements enhance CLI usability without breaking existing usage patterns.
- Create individual setup functions for each common flag (quality, override, split, timeout)
- Create setupCommonFlags function that sets up all common flags in one call
- Simplify optimize_command.go and watch_command.go by using setupCommonFlags
- All flags now centralized in flags.go for better maintainability
- All tests continue to pass
Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
- Add detailed docstring to setupFormatFlag explaining parameters and usage
- Add detailed docstring to setupTestCommand explaining return values
- Use constant.DefaultConversion instead of hard-coded constant.WebP for better maintainability
- Clarify when bindViper should be true vs false
Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
- Create setupTestCommand helper function to reduce test duplication
- Update all format flag tests to use shared setupFormatFlag function
- Remove unused enumflag import from test file
- Ensures test consistency with production code
- All tests continue to pass
Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
- Extract format flag setup logic into shared flags.go file
- Create setupFormatFlag function to eliminate duplication between optimize and watch commands
- Add bindViper parameter to support different flag binding strategies
- Remove duplicate enumflag imports from command files
- All tests continue to pass
Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
- Remove NoOptDefVal which caused the format flag to fail with space-separated values
- Add 5 comprehensive unit tests for format flag: space syntax, short form, equals syntax, default value, and case-insensitive
- Update README with detailed format flag documentation and examples
- Format flag now works with all syntaxes: --format webp, -f webp, --format=webp
- Default value (webp) is preserved and shown in help text
Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>