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

Method parseExtend

options/parser/parse.go:399–418  ·  view source on GitHub ↗
(
	ctx context.Context,
	o *options.Options,
	key string,
	args []string,
)

Source from the content-addressed store, hash-verified

397}
398
399func (p *Parser) parseExtend(
400 ctx context.Context,
401 o *options.Options,
402 key string,
403 args []string,
404) error {
405 if err := p.ensureMaxArgs(ctx, key, args, 4); err != nil {
406 return err
407 }
408
409 if err := p.parseBool(ctx, o, key+keys.SuffixEnabled, args[0]); err != nil {
410 return err
411 }
412
413 if len(args) > 1 {
414 return p.parseGravity(ctx, o, key+keys.SuffixGravity, processing.ExtendGravityTypes, args[1:]...)
415 }
416
417 return nil
418}

Callers 2

applyExtendOptionMethod · 0.95

Calls 3

ensureMaxArgsMethod · 0.95
parseBoolMethod · 0.95
parseGravityMethod · 0.95

Tested by

no test coverage detected