refactor: extract imageprocessor into its own package
All checks were successful
check / check (push) Successful in 58s
All checks were successful
check / check (push) Successful in 58s
Move ImageProcessor, Params, New(), DefaultMaxInputBytes, ErrInputDataTooLarge, and related types from internal/imgcache/ into a new standalone package internal/imageprocessor/. The imageprocessor package defines its own Format, FitMode, Size, Request, and Result types, making it fully independent with no imports from imgcache. The imgcache service converts between its own types and imageprocessor types at the boundary. Changes: - New package: internal/imageprocessor/ with imageprocessor.go and tests - Removed: processor.go and processor_test.go from internal/imgcache/ - Removed: Processor interface and ProcessResult from imgcache.go (now unused) - Updated: service.go uses *imageprocessor.ImageProcessor directly - Copied: testdata/red.avif for AVIF decode test Addresses review feedback on PR #37: image processing is a distinct concern from the HTTP service layer and belongs in its own package.
This commit is contained in:
BIN
internal/imageprocessor/testdata/red.avif
vendored
Normal file
BIN
internal/imageprocessor/testdata/red.avif
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 281 B |
Reference in New Issue
Block a user