refactor: use Params struct for imageprocessor constructor
All checks were successful
check / check (push) Successful in 1m36s
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user