refactor: use Params struct for imageprocessor constructor
All checks were successful
check / check (push) Successful in 1m36s

Rename NewImageProcessor(maxInputBytes) to New(Params{}) with a Params
struct containing MaxInputBytes. Zero-value Params{} uses sensible
defaults (DefaultMaxInputBytes). All callers updated.

Addresses review feedback on PR #37.
This commit is contained in:
user
2026-03-17 19:53:40 -07:00
parent 18f218e039
commit d36e511032
3 changed files with 31 additions and 22 deletions

View File

@@ -82,7 +82,7 @@ func NewService(cfg *ServiceConfig) (*Service, error) {
return &Service{
cache: cfg.Cache,
fetcher: fetcher,
processor: NewImageProcessor(maxResponseSize),
processor: New(Params{MaxInputBytes: maxResponseSize}),
signer: signer,
whitelist: NewHostWhitelist(cfg.Whitelist),
log: log,