MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / applyCacheBusterOption

Method applyCacheBusterOption

options/parser/apply.go:397–410  ·  view source on GitHub ↗
(ctx context.Context, o *options.Options, args []string)

Source from the content-addressed store, hash-verified

395}
396
397func (p *Parser) applyCacheBusterOption(ctx context.Context, o *options.Options, args []string) error {
398 if err := p.ensureMaxArgs(ctx, keys.CacheBuster, args, 1); err != nil {
399 return err
400 }
401
402 if len(args[0]) == 0 {
403 o.Delete(keys.CacheBuster)
404 return nil
405 }
406
407 o.Set(keys.CacheBuster, args[0])
408
409 return nil
410}
411
412func (p *Parser) applySkipProcessingFormatsOption(ctx context.Context, o *options.Options, args []string) error {
413 for _, format := range args {

Callers 1

applyURLOptionMethod · 0.95

Calls 3

ensureMaxArgsMethod · 0.95
DeleteMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected