(ctx context.Context, o *options.Options, args []string)
| 381 | } |
| 382 | |
| 383 | func (p *Parser) applyFormatOption(ctx context.Context, o *options.Options, args []string) error { |
| 384 | if err := p.ensureMaxArgs(ctx, keys.Format, args, 1); err != nil { |
| 385 | return err |
| 386 | } |
| 387 | |
| 388 | if f, ok := imagetype.GetTypeByName(args[0]); ok { |
| 389 | o.Set(keys.Format, f) |
| 390 | } else { |
| 391 | return newInvalidArgumentError(ctx, keys.Format, args[0], "supported image format") |
| 392 | } |
| 393 | |
| 394 | return nil |
| 395 | } |
| 396 | |
| 397 | func (p *Parser) applyCacheBusterOption(ctx context.Context, o *options.Options, args []string) error { |
| 398 | if err := p.ensureMaxArgs(ctx, keys.CacheBuster, args, 1); err != nil { |
no test coverage detected